https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105880
--- Comment #12 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jonathan Wakely <r...@gcc.gnu.org>: https://gcc.gnu.org/g:1e65f2ed99024f23c56f7b6a961898bcaa882a92 commit r13-1039-g1e65f2ed99024f23c56f7b6a961898bcaa882a92 Author: Jonathan Wakely <jwak...@redhat.com> Date: Wed Jun 8 10:43:57 2022 +0100 libstdc++: Fix lifetime bugs for non-TLS eh_globals [PR105880] This ensures that the single-threaded fallback buffer eh_globals is not destroyed during program termination, using the same immortalization technique used for error category objects. Also ensure that init._M_init can still be read after init has been destroyed, by making it a static data member. libstdc++-v3/ChangeLog: PR libstdc++/105880 * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and prevent destruction during termination. (__eh_globals_init::_M_init): Replace with static member _S_init. (__cxxabiv1::__cxa_get_globals_fast): Update. (__cxxabiv1::__cxa_get_globals): Likewise.