File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -181,7 +181,7 @@ AUTO_CTOR_DTOR = -DAUTO_CTOR_DTOR=1
181181# # Unmap user and bitmap in the destructor. You probably
182182# # don't want this as theres no guarantee the IsoAlloc
183183# # destructor will be called last and other destructors
184- # # that call free will segfault
184+ # # may reference objects within these pages
185185ISO_DTOR_CLEANUP = -DISO_DTOR_CLEANUP=0
186186
187187# # Register a signal handler for SIGSEGV that inspects si_addr
Original file line number Diff line number Diff line change @@ -1989,9 +1989,20 @@ INTERNAL_HIDDEN void _iso_alloc_destroy(void) {
19891989 unmap_guarded_pages (_root -> chunk_lookup_table , CHUNK_TO_ZONE_TABLE_SZ );
19901990 unmap_guarded_pages (_root -> chunk_quarantine , ROUND_UP_PAGE (CHUNK_QUARANTINE_SZ * sizeof (uintptr_t )));
19911991 unmap_guarded_pages (zone_cache , ROUND_UP_PAGE (ZONE_CACHE_SZ * sizeof (_tzc )));
1992+
1993+ #if THREAD_SUPPORT && !USE_SPINLOCK
1994+ UNLOCK_BIG_ZONE ();
1995+ pthread_mutex_destroy (& _root -> big_zone_busy_mutex );
1996+ #endif
1997+
19921998 unmap_guarded_pages (_root , sizeof (iso_alloc_root ));
19931999#endif
19942000 UNLOCK_ROOT ();
2001+
2002+ #if ISO_DTOR_CLEANUP && THREAD_SUPPORT && !USE_SPINLOCK
2003+ pthread_mutex_destroy (& sane_cache_mutex );
2004+ pthread_mutex_destroy (& root_busy_mutex );
2005+ #endif
19952006}
19962007
19972008#if UNIT_TESTING
You can’t perform that action at this time.
0 commit comments