[Bug libstdc++/52604] mt allocator crashes on multi-threaded
paolo.carlini at oracle dot com
gcc-bugzilla@gcc.gnu.org
Thu Apr 12 16:30:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52604
--- Comment #11 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-04-12 16:29:32 UTC ---
In mainline, for x86_64-linux, the below patchlet indeed avoids the valgrind
errors and passes make check, make check-performance.
Index: src/c++98/mt_allocator.cc
===================================================================
--- src/c++98/mt_allocator.cc (revision 186374)
+++ src/c++98/mt_allocator.cc (working copy)
@@ -48,6 +48,7 @@
{
__gthread_key_delete(_M_key);
::operator delete(static_cast<void*>(_M_thread_freelist_array));
+ _M_thread_freelist = 0;
}
}
};
More information about the Gcc-bugs
mailing list