Skip to content

Commit 2172e09

Browse files
committed
Fix crash
1 parent 2cecd89 commit 2172e09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mono/metadata/domain.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,8 +1227,12 @@ mono_domain_free (MonoDomain *domain, gboolean force)
12271227

12281228
domain->setup = NULL;
12291229

1230+
#if !HAVE_BDWGC_GC
1231+
// This crashes in bdwgc because we never register such a root.
1232+
// Not sure why/how it works in sgen, or if it is needed?
12301233
if (mono_gc_is_moving ())
12311234
mono_gc_deregister_root ((char*)&(domain->MONO_DOMAIN_FIRST_GC_TRACKED));
1235+
#endif
12321236

12331237
mono_appdomains_lock ();
12341238
appdomains_list [domain->domain_id] = NULL;

0 commit comments

Comments
 (0)