[cxx-abi-dev] Adding __cxa_thread_atexit() to the C++ ABI?

Matthew Dempsky matthew at dempsky.org
Thu May 8 19:41:53 UTC 2014


On Wed, May 7, 2014 at 11:41 AM, Jason Merrill <jason at redhat.com> wrote:
> On 05/07/2014 01:15 PM, Matthew Dempsky wrote:
>>
>> +Additionally, the registration increments the reference count for DSO
>> <code>d</code>.
>
>
>> +After <code>f(p)</code> returns, the reference count for DSO
>> <code>d</code> is decremented.
>
>
> This seems overly specific to the glibc implementation; I would say
> something more generic, perhaps just that the effect of dlclose with pending
> cleanups is undefined.

Any suggestions on appropriate relaxed wording?  Should I just remove
this wording altogether?

Is it worth instead including some informative text reminding that
C++11 requires destruction of objects with thread storage duration to
be sequenced before destruction of objects with static storage
duration, so implementations should make sure they DSO isn't unloaded
(and its static objects destroyed) until all outstanding thread-local
registrations have run (e.g., by holding a DSO reference count in the
registration)?


More information about the cxx-abi-dev mailing list