Re: Implement __cxa_thread_atexit

2017-11-22 Thread Joerg Sonnenberger
On Mon, Nov 20, 2017 at 10:07:33PM +0100, Mark Kettenis wrote: > > Date: Sun, 19 Nov 2017 23:13:05 +0100 > > From: Joerg Sonnenberger > > > > On Sun, Nov 19, 2017 at 11:05:31PM +0100, Joerg Sonnenberger wrote: > > > On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > >

Re: Implement __cxa_thread_atexit

2017-11-20 Thread Mark Kettenis
> Date: Sun, 19 Nov 2017 23:13:05 +0100 > From: Joerg Sonnenberger > > On Sun, Nov 19, 2017 at 11:05:31PM +0100, Joerg Sonnenberger wrote: > > On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > > > Here is an update diff that implements __cxa_thread_atexit which is >

Re: Implement __cxa_thread_atexit

2017-11-19 Thread Joerg Sonnenberger
On Sun, Nov 19, 2017 at 11:05:31PM +0100, Joerg Sonnenberger wrote: > On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > > Here is an update diff that implements __cxa_thread_atexit which is > > emitted by clang (and modern gcc) to implement certain aspects of > > C++11 thread_local.

Re: Implement __cxa_thread_atexit

2017-11-19 Thread Joerg Sonnenberger
On Sun, Nov 19, 2017 at 10:04:45PM +0100, Mark Kettenis wrote: > Here is an update diff that implements __cxa_thread_atexit which is > emitted by clang (and modern gcc) to implement certain aspects of > C++11 thread_local. Note that without providing __cxa_thread_atexit, gcc will not detect it

Implement __cxa_thread_atexit

2017-11-19 Thread Mark Kettenis
Here is an update diff that implements __cxa_thread_atexit which is emitted by clang (and modern gcc) to implement certain aspects of C++11 thread_local. Compared to the previous function this now also prevents unloading of shared libraries that call __cxa_thread_atexit. As before uou'll need to

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Joerg Sonnenberger
the corner case, you can directly use the generic fallback implementation in libc++abi. Preventing unloading is the least stupid of all options, the rest basically break one major promise or another. > I've chosen to implement __cxa_thread_atexit() directly instead of > __cxa_thr

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
On Fri, 11 Aug 2017, Todd C. Miller wrote: > On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > > > I've chosen to implement __cxa_thread_atexit() directly instead of > > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > > don't need

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Todd C. Miller
On Fri, 11 Aug 2017 16:31:44 +0200, Mark Kettenis wrote: > I've chosen to implement __cxa_thread_atexit() directly instead of > __cxa_thread_atexit_impl(). I think that is cleaner. It means we > don't need to make changes to libc++ for this to start working. It > looks like mo

Re: Implement __cxa_thread_atexit

2017-08-11 Thread Philip Guenther
ts unloading of shared libraries that > registered such destructors to prevent things from crashing. This diff > does not implement that functionality yet. I plan to add that later. > I expect this to be a bit of a corner case. > > I've chosen to implement __cxa_threa

Implement __cxa_thread_atexit

2017-08-11 Thread Mark Kettenis
to prevent things from crashing. This diff does not implement that functionality yet. I plan to add that later. I expect this to be a bit of a corner case. I've chosen to implement __cxa_thread_atexit() directly instead of __cxa_thread_atexit_impl(). I think that is cleaner. It means we don't