Skip to content

Commit

Permalink
[mono] Fix condition for disabling extra checks in verify_class_overr…
Browse files Browse the repository at this point in the history
…ides (#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: #101312
  • Loading branch information
AustinWise authored Apr 24, 2024
1 parent 33092b8 commit 9aaf602
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/mono/mono/metadata/class-setup-vtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,7 @@ mono_method_get_method_definition (MonoMethod *method)
static gboolean
verify_class_overrides (MonoClass *klass, MonoMethod **overrides, int onum)
{
// on windows and arm, we define NDEBUG for release builds
// on browser and wasi, we define DEBUG for debug builds
#ifdef ENABLE_CHECKED_BUILD
#ifndef ENABLE_CHECKED_BUILD
if (klass->image == mono_defaults.corlib)
return TRUE;
#endif
Expand Down

0 comments on commit 9aaf602

Please sign in to comment.