https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60966
Hideaki Kimura <hideaki.kimura at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hideaki.kimura at gmail dot com --- Comment #11 from Hideaki Kimura <hideaki.kimura at gmail dot com> --- Hi, I'm also (seemingly) hitting this issue. When I run my program with valgrind, I get what Thomas reported. ==22319== Invalid read of size 4 ==22319== at 0x370940D201: pthread_once (pthread_once.S:111) ==22319== by 0x4C80524: ....<my functions> (gthr-default.h:699) ... ==22319== Address 0x52c52a4 is 132 bytes inside a block of size 136 free'd ==22319== at 0x4A07991: operator delete(void*) (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so) ==22319== by 0x4C82456: ...<my function> (shared_ptr_base.h:161) ==22319== by 0x370C4B52AF: execute_native_thread_routine (thread.cc:84) ==22319== by 0x3709407F32: start_thread (pthread_create.c:309) ==22319== by 0x37090F4DEC: clone (clone.S:111) ==22319== My environment is Fedora 20, x86_64, g++ (GCC) 4.8.2 20131212 (Red Hat 4.8.2-7). Any workaround?