Skip to content

Commit d5dda41

Browse files
AustinWisemichaelgsharp
authored andcommitted
[mono] Fix condition for disabling extra checks in verify_class_overrides (dotnet#101445)
`ENABLE_CHECKED_BUILD` is defined to mean "Enable additional checks" and is enabled in checked and debug builds. Therefore this performance optimization should be enabled when `ENABLE_CHECKED_BUILD` is *not* defined. Ref: dotnet#101312
1 parent 771df6c commit d5dda41

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/mono/mono/metadata/class-setup-vtable.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -773,9 +773,7 @@ mono_method_get_method_definition (MonoMethod *method)
773773
static gboolean
774774
verify_class_overrides (MonoClass *klass, MonoMethod **overrides, int onum)
775775
{
776-
// on windows and arm, we define NDEBUG for release builds
777-
// on browser and wasi, we define DEBUG for debug builds
778-
#ifdef ENABLE_CHECKED_BUILD
776+
#ifndef ENABLE_CHECKED_BUILD
779777
if (klass->image == mono_defaults.corlib)
780778
return TRUE;
781779
#endif

0 commit comments

Comments
 (0)