This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Memory fencing problem in pthread cancellation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]