From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-5.5 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 4144E1F8C6 for ; Thu, 26 Aug 2021 11:57:40 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 566CB3858434 for ; Thu, 26 Aug 2021 11:57:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 566CB3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629979059; bh=bpR9LhzaASbvH5KOtalhCJ4NyQFe5oGGNc76CW60gxk=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=trV4PUCOUEz7eFTejX1yMqwfO/xVAQKyPBYfjfo8z9sFJOiV9TNgxmL//KOLqz9uZ KlBSJaKUh1gQUh8WwN5Sw/+O9imJ5+sL6A6ESzfBjJImLNLa1BwMlBWaacR7qrDUBg HmyOaK4fRiQkGtlI8zEi7ATE9KyX++Ja0khsgUtw= Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by sourceware.org (Postfix) with ESMTPS id 51C1B3858415 for ; Thu, 26 Aug 2021 11:56:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51C1B3858415 Received: by mail-qk1-x72a.google.com with SMTP id 14so2981711qkc.4 for ; Thu, 26 Aug 2021 04:56:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=bpR9LhzaASbvH5KOtalhCJ4NyQFe5oGGNc76CW60gxk=; b=h8NdqbeZ5HpNiMs7uX5ECpOofONFNPo13VqJ1qWVLvDLf1OKwbNo3cErjYqF2b9LLn 4nxZ/w+a/nLLapvSIGoWfjClaRY82pLUkhdryWX7QHzgMFNwgQthaJ//JpIEEwQZQ2HN qkYOUb3bhD2YU/WrF0x18DXRa4GqIBrY6An/ifHC3TBfdzK7nX0YVpyKOASanC/Mvp5s JEdc3aLliwQWRdV6K891CLaAB2U3fK5Hb3FRW2KWjsY/H5YIoD9Qfr+semjvXW9DeEhh jhacfl6RVtYLEs8eEcQHOC4nQpaE5qyZoVHSFu3g3s8AT6AbzyDP7Y1cXKXoEQynOjdc VG5g== X-Gm-Message-State: AOAM531U9SIwrwPdjdT5dky6o1NoANPcF3GHA9AAnCdGFkUYPdNnyY80 GIqzR6r131Vdr+NT4Ik9pdad6/NDN8nmzQ== X-Google-Smtp-Source: ABdhPJxuDvRkUV/Z2xYFnKHSv+Ms7qISv+ot5X5PSZ0TL5uKtMoPOYhjcS3IYOBpaDemMfpY+ogFBQ== X-Received: by 2002:a05:620a:1aa7:: with SMTP id bl39mr3426580qkb.304.1629978997752; Thu, 26 Aug 2021 04:56:37 -0700 (PDT) Received: from ?IPv6:2804:431:c7ca:1a68:4988:5e6e:21a3:3c6b? ([2804:431:c7ca:1a68:4988:5e6e:21a3:3c6b]) by smtp.gmail.com with ESMTPSA id t8sm1647138qtn.37.2021.08.26.04.56.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Aug 2021 04:56:37 -0700 (PDT) Subject: Re: [PATCH v2 02/19] nptl: Set cancellation type and state on pthread_exit To: Florian Weimer References: <20210823195047.543237-1-adhemerval.zanella@linaro.org> <20210823195047.543237-3-adhemerval.zanella@linaro.org> <87pmu08s15.fsf@oldenburg.str.redhat.com> <87h7fc8ru7.fsf@oldenburg.str.redhat.com> Message-ID: Date: Thu, 26 Aug 2021 08:56:35 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87h7fc8ru7.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Adhemerval Zanella via Libc-alpha Reply-To: Adhemerval Zanella Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On 26/08/2021 06:42, Florian Weimer wrote: > * Florian Weimer: > >> * Adhemerval Zanella: >> >>> +/* Check if a thread with PTHREAD_CANCEL_ASYNCHRONOUS cancellation on >>> + blocked read() sets the correct state and type as pthread_exit. */ >>> +static void * >>> +tf_cancel_async (void *arg) >>> +{ >>> + TEST_VERIFY (pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, NULL) >>> + == 0); >>> + >>> + xpthread_barrier_wait (&b); >>> + >>> + pthread_cleanup_push (clh, NULL); >> >> This assumes that pthread_cleanup_push is async-cancel-safe. According >> to this thread: >> >> Async cacellation and pthread_cleanup_push >> >> >> this is not always true. >> >> Should we build this test with -fno-exceptions? >> >> Rest of the patch looks okay to me. > > And this should probably reference a Bugzilla bug. I have opened https://sourceware.org/bugzilla/show_bug.cgi?id=28267