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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Or do you mean it is possible that for two unrelated variables
variable 1 with its guard          variable 2 with its guard
__cxa_guard_acquire succeeds
ctor is called
                                   __cxa_guard_acquire succeeds
                                   ctor is called
                                   __cxa_guard_release is called
                                   __cxa_atexit is called
__cxa_guard_release is called
__cxa_atexit is called
?
I don't see how swapping __cxa_atexit and __cxa_guard_release would help,
__cxa_guard_acquire at least on most targets isn't a global synchronization
primitive that would serialize all local constructors, and making it
serializing would be very expensive.

Reply via email to