This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Memory fencing problem in pthread cancellation
- From: Rich Felker <dalias at aerifal dot cx>
- To: libc-alpha at sourceware dot org
- Date: Mon, 14 Jan 2013 22:50:00 -0500
- Subject: Re: [PATCH] Memory fencing problem in pthread cancellation
- References: <50F46969.1000305@redhat.com>
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