http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47762
chrbr at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chrbr at gcc dot gnu.org --- Comment #7 from chrbr at gcc dot gnu.org 2012-04-18 07:10:45 UTC --- Extended the testsuite to force threads, so that __gthread_active_p path is on, we still get segfaults on deallocate_global_thread-1.cc Backtrace is in __gthread_key_delete(_M_key), _M_key is 0 at this point. ~__freelist() { if (_M_thread_freelist_array) { __gthread_key_delete(_M_key); ::operator delete(static_cast<void*>(_M_thread_freelist_array)); _M_thread_freelist = 0; } } since the _M_thread_freelist setting to 0 is done afterward, I'm afraid this is still fragile and mt_deallocate still have pending issues.