-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Priority:3Work that is nice to haveWork that is nice to havearea-Metadiscussionin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime
Milestone
Description
-
There are at least 3 asserts that are always true, because of a forgotten
!before the message, when fixed they fail on some tests, see Fix asserts that were always true due to a missed neg. #44095, PTAL @tannergooding. -
PORTABILITY_ASSERT(message)(108 usages) are quite confusing because they don't check a condition and fail always. They could be replaced byunreachedorunimplementedmethods, also this block looks pretty outdated:
runtime/src/coreclr/src/inc/palclr.h
Lines 103 to 111 in df8e3f6
#if defined(TARGET_X86) // Finished ports - compile-time errors #define PORTABILITY_WARNING(message) NEED_TO_PORT_THIS_ONE(NEED_TO_PORT_THIS_ONE) #define PORTABILITY_ASSERT(message) NEED_TO_PORT_THIS_ONE(NEED_TO_PORT_THIS_ONE) #else // Ports in progress - run-time asserts only #define PORTABILITY_WARNING(message) #define PORTABILITY_ASSERT(message) _ASSERTE(false && (message)) #endif
are not other platforms finished now?
PTAL @BruceForstall, @davidwrighton, you had a similar discussion about IMPL_LIMIT recently, do you have preferences about assert/unimplemented/unreached usages? -
There are 6 usages of
ASSERT(!"message")and 360 usages ofASSERT("message")with different defines, probably replace both with better debug onlyunreached("message")?
cc @dotnet/jit-contrib
Metadata
Metadata
Assignees
Labels
Priority:3Work that is nice to haveWork that is nice to havearea-Metadiscussionin-prThere is an active PR which will close this issue when it is mergedThere is an active PR which will close this issue when it is mergedruntime-coreclrspecific to the CoreCLR runtimespecific to the CoreCLR runtime