bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: __pthread_setcancelstate called unconditionally, crashes at 0


From: Florian Weimer
Subject: Re: __pthread_setcancelstate called unconditionally, crashes at 0
Date: Thu, 11 May 2023 19:44:42 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

* Sergey Bugaev:

> Clearly __pthread_setcancelstate has been pragma weak'd, and used here
> without a check. This is a statically linked x86_64-gnu (so, Hurd and
> HTL) executable. Commit 93d78ec1cba68184931b75bef29afd3aed30f43a
> "nptl: Move pthread_setcancelstate into libc" seems to be the culprit:
> that commit only moved the NPTL symbol into libc, yet changed the
> original __libc_ptf_call (__pthread_setcancelstate) calls to direct
> __pthread_setcancelstate calls, in this and many other places.

Apparently, Hurd does not support async cancellation?  Then
__pthread_setcancelstate never has to unwind, so you just turn it into a
non-weak symbol.

If you need async cancellation support, the core cancellation routine
could be made weak, so that it is linked into the executable only if
pthread_cancel is ever called.

Thanks,
Florian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]