https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105880

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Sebastian Huber
<s...@gcc.gnu.org>:

https://gcc.gnu.org/g:ade3197134cc9ed2b7e589a7b58c73110ae13f1c

commit r12-8589-gade3197134cc9ed2b7e589a7b58c73110ae13f1c
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.

    (cherry picked from commit 1e65f2ed99024f23c56f7b6a961898bcaa882a92)
  • [Bug libstdc++/105880] eh_globa... cvs-commit at gcc dot gnu.org via Gcc-bugs

Reply via email to