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; } } };