https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103400
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #0) > Similarly, when built with --enable-libstdcxx-allocator=mt lots of tests > fail, because the __gnu_cxx::__common_pool<__gnu_cxx::__pool, > true>::_S_get_pool()::_S_pool static variable and its guard variable are not > exported. That means the linker cannot combine the definition in > libstdc++.so with the one in user code, and we get two copies of it. This > means allocations and deallocations might happen in different pools, and so > segfault. nm /tmp/alloc/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so | fgrep _S_pool 00000000002205e8 b _ZGVZN9__gnu_cxx13__common_poolINS_6__poolELb1EE11_S_get_poolEvE7_S_pool 0000000000220600 b _ZZN9__gnu_cxx13__common_poolINS_6__poolELb1EE11_S_get_poolEvE7_S_pool They should have type 'u'. It can be fixed by: --- a/libstdc++-v3/config/abi/pre/gnu.ver +++ b/libstdc++-v3/config/abi/pre/gnu.ver @@ -2400,6 +2400,8 @@ GLIBCXX_3.4.29 { GLIBCXX_3.4.30 { _ZSt21__glibcxx_assert_fail*; + _ZGVZN9__gnu_cxx13__common_poolINS_6__poolELb1EE11_S_get_poolEvE7_S_pool; + _ZZN9__gnu_cxx13__common_poolINS_6__poolELb1EE11_S_get_poolEvE7_S_pool; } GLIBCXX_3.4.29;