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 902E11F8C6 for ; Thu, 26 Aug 2021 11:53:07 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 507CD3857C6D for ; Thu, 26 Aug 2021 11:53:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 507CD3857C6D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1629978786; bh=OiDi+Dmajq2FyofXQAzDyZnXz9MavL2zBBlaox7KSCI=; 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=uBe7snvVkXR9C1XmNgZRmDbFaB85RvKe97hIp7EF/12nCCB8E4eyO9gqZ/GhKa7Q1 fFn5dpiOvc9oG0Z4ECn2nr4xTrMMq8XPtgUXXz4FGS9UcTkAH/ucgIMmAQJq+ErxOa z7XBxFWsyV62FNM1ryums1l6gmFpTiXT3h7v0kiY= Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 38BD93858402 for ; Thu, 26 Aug 2021 11:52:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38BD93858402 Received: by mail-qv1-xf30.google.com with SMTP id v1so1801518qva.7 for ; Thu, 26 Aug 2021 04:52:37 -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=OiDi+Dmajq2FyofXQAzDyZnXz9MavL2zBBlaox7KSCI=; b=rNq02GQijhEBtF/i01Mca5ojuW+ZGeHyuyt2HM8Ps78jA/MHtXMHRCinrW9APejFq0 J0vn0UPsDXkCsSTWecVk8rkuJIxojIxU4CLZAYj8iw13ncVOE7zk0i3VK/uukHeoKdwn HueXXq3Ej2xl2yPKBUUtxCE88Ej2nj5Vc9xjmIS3GI2ma4pxeIgJugMykRzX7r449BL/ gqnXTm17e0NyvVdit5dK4pD9GbiWO4dT0sY90yfV8t4M0NG65YFFfOVB5EUHhtzL6mwh 82kjPk289T5qCifeRZ7Ska2ow0zTIekNfpnGORexVe4XgHaF+u4/3tHixdP9+edX2vRF zaZQ== X-Gm-Message-State: AOAM531/q92niF9xmZQueRvM9B21YNHnKuKkGk1j2G6alOFG0SMybK3l ZgGHG4ItCN3aMn9/EIVJwyYgaaQEJiKBcQ== X-Google-Smtp-Source: ABdhPJxmAKQC6nvQZUL2xHf9/0C/HPCiXX8ciGPLyH0TcquLdSoZoq2vn3y0YW2Fa8T6FITZH7lyjA== X-Received: by 2002:ad4:4b61:: with SMTP id m1mr3710317qvx.32.1629978756495; Thu, 26 Aug 2021 04:52:36 -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 g12sm2174935qkm.112.2021.08.26.04.52.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 26 Aug 2021 04:52:36 -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> Message-ID: <79173390-c569-6362-7402-0c5211b719b1@linaro.org> Date: Thu, 26 Aug 2021 08:52:34 -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: <87pmu08s15.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:38, Florian Weimer wrote: > * 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? Or I can't remove the aync test part and only test the deferred part, I don't have a strong opinion. > > Rest of the patch looks okay to me. > > Thanks, > Florian >