diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-06-08 10:43:57 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-06-10 15:24:29 +0100 |
commit | 1e65f2ed99024f23c56f7b6a961898bcaa882a92 (patch) | |
tree | ee64eadb60c3441470c37a5a750ec11f1467ea0b /libstdc++-v3/include/std/numeric | |
parent | 1753a7120109c1d3b682f9487d6cca64fb2f0929 (diff) | |
download | gcc-1e65f2ed99024f23c56f7b6a961898bcaa882a92.zip gcc-1e65f2ed99024f23c56f7b6a961898bcaa882a92.tar.gz gcc-1e65f2ed99024f23c56f7b6a961898bcaa882a92.tar.bz2 |
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.
Diffstat (limited to 'libstdc++-v3/include/std/numeric')
0 files changed, 0 insertions, 0 deletions