From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 4312A3858C5F for ; Thu, 11 May 2023 17:52:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4312A3858C5F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxAT5-00044L-JI; Thu, 11 May 2023 13:52:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=In-Reply-To:MIME-Version:References:Subject:To:From: Date; bh=vFpjnu0XpNmwKgV+S/J8WCnhrSl6g+FpirjRIoO1jlo=; b=RJmQND9AM57X/RIMl9wj VmgXJuLhVdxzvIPV+qX1G6b04pw8wkeOR2i0EsRctnv0SejAEOtgRsUcmTDHWqvXYu9fG98sCOtCB TrjwGy6smI2Pi4fOK6xA0ayh3pH0zIDEAgsIjFASyZsvIHXQO4+DNo7tR7MV+fnUOZ7tgh16C0GLv Zu9ZcL3eqaVzYhmBcsjfOjeplqMw1H/vxaOxBztjInhDPNkxRY698by4/to3XIzKtaAYUufk1qL3k BWcmfRu0s8LtEpuRveIlvcdI9F/0fplHxKnlWg7uzzT+P7AKR5F8/uT4KTocWkGU5VR5eUUuJuURm GocG/JQGgWmxLA==; Received: from lfbn-bor-1-1163-184.w92-158.abo.wanadoo.fr ([92.158.138.184] helo=begin) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pxAT5-0001dA-Ce; Thu, 11 May 2023 13:52:43 -0400 Received: from samy by begin with local (Exim 4.96) (envelope-from ) id 1pxAT3-007Hwn-0Z; Thu, 11 May 2023 19:52:41 +0200 Date: Thu, 11 May 2023 19:52:41 +0200 From: Samuel Thibault To: Florian Weimer Cc: Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd Subject: Re: __pthread_setcancelstate called unconditionally, crashes at 0 Message-ID: <20230511175241.ohixyohfjsaoo3yq@begin> Mail-Followup-To: Florian Weimer , Sergey Bugaev , libc-alpha@sourceware.org, bug-hurd References: <87ilcyg3ud.fsf@oldenburg3.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ilcyg3ud.fsf@oldenburg3.str.redhat.com> Organization: I am not organized User-Agent: NeoMutt/20170609 (1.8.3) X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. Samuel