[PATCH] Memory fencing problem in pthread cancellation
Rich Felker
dalias@aerifal.cx
Tue Jan 15 03:50:00 GMT 2013
On Mon, Jan 14, 2013 at 01:24:09PM -0700, Jeff Law wrote:
> There's a couple ways to fix this. One could be to eliminate the
> early return from pthread_cancel_init. Unfortunately there's a call
> to pthread_cancel_init from pthread_cancel. So every one of those
> calls would suffer a performance penalty unless libgcc_s_handle as
> exported from unwind-forcedunwind.c
The cleanest and most correct way to fix this is to add libgcc_s.so to
the DT_NEEDED for libpthread.so and remove the silly dynamic loading
code. Then no global state exists and everything just works. This
would also eliminate the unfortunate, really nasty situation whereby
pthread_cancel can abort the whole application due to failure to load
libgcc_s.so.
Rich
More information about the Libc-alpha
mailing list