pthread_cancel async-signal-safe

Joseph Myers joseph@codesourcery.com
Fri Dec 4 18:32:43 GMT 2020


On Fri, 4 Dec 2020, Adhemerval Zanella via Libc-alpha wrote:

> For 1. I don't see a easier solution without moving pthread_cancel_init
> to out of pthread_cancel and this has its own drawbacks (by always
> forcing loading libgcc_s.so when libpthread is linked).   

libgcc_s.so should indeed be loaded on startup (loading it later has the 
problem of introducing failures, if loading fails, in a context where 
failures aren't expected).

> Maybe linking libgcc_s.a statically with libpthread and remove the
> dynamic loading of libgcc_s.so? I am not sure of this implication 
> of this strategy.

I'd expect bootstrapping problems, and possibly also problems working with 
unwind information coming from newer GCC versions than the one libgcc_eh.a 
came from.

We have a long comment in Makeconfig about linking with libgcc.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list