From: Florian Weimer <fweimer@redhat.com>
To: Sergey Bugaev <bugaevc@gmail.com>
Cc: libc-alpha@sourceware.org, bug-hurd <bug-hurd@gnu.org>
Subject: Re: __pthread_setcancelstate called unconditionally, crashes at 0
Date: Thu, 11 May 2023 19:56:22 +0200 [thread overview]
Message-ID: <87bkiqg3ax.fsf@oldenburg3.str.redhat.com> (raw)
In-Reply-To: <20230511175241.ohixyohfjsaoo3yq@begin> (Samuel Thibault's message of "Thu, 11 May 2023 19:52:41 +0200")
* Samuel Thibault:
> Florian Weimer, le jeu. 11 mai 2023 19:44:42 +0200, a ecrit:
>> * 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?
>
> ? It does, see htl/pt-cancel.c's check for
> PTHREAD_CANCEL_ASYNCHRONOUS.
But __pthread_setcancelstate does not trigger async cancellation if
there's a pending async request and cancellation is enabled.
Thanks,
Florian
next prev parent reply other threads:[~2023-05-11 17:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-11 17:31 Sergey Bugaev
2023-05-11 17:44 ` Florian Weimer
2023-05-11 17:52 ` Samuel Thibault
2023-05-11 17:56 ` Florian Weimer [this message]
2023-05-11 18:00 ` Sergey Bugaev
2023-05-11 18:12 ` Florian Weimer
2023-05-11 18:28 ` Sergey Bugaev
2023-05-11 18:35 ` Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkiqg3ax.fsf@oldenburg3.str.redhat.com \
--to=fweimer@redhat.com \
--cc=bug-hurd@gnu.org \
--cc=bugaevc@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).