[Bug libstdc++/58142] _pthread_tsd_cleanup called before destructors are called

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Feb 4 09:32:00 GMT 2019


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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org
          Component|c++                         |libstdc++
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=78968

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I think it's still open because nobody has looked at it again recently, not
because of any conscious decision.

I'm changing the component to libstdc++ as the runtime library is responsible
for the cleanup.

Iain, what do you think? If comment 2 is right, then GCC 7.1 and later will use
__cxa_thread_atexit from libc and the destruction order will be correct. I
don't know when Darwin libc acquired that function, maybe it's in all supported
versions of Darwin but we just didn't use it until the PR 78968 change.


More information about the Gcc-bugs mailing list