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=-3.3 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,PDS_RDNS_DYNAMIC_FP, RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 639BD1F8C6 for ; Wed, 4 Aug 2021 16:24:27 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 98B173983051 for ; Wed, 4 Aug 2021 16:24:26 +0000 (GMT) Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by sourceware.org (Postfix) with ESMTPS id 21E0E3857408 for ; Wed, 4 Aug 2021 16:24:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 21E0E3857408 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Gfxrs6jb4z1sCx8; Wed, 4 Aug 2021 18:24:13 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Gfxrs6RHyz1qry9; Wed, 4 Aug 2021 18:24:13 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id jYgWOv7DCt3Y; Wed, 4 Aug 2021 18:24:13 +0200 (CEST) X-Auth-Info: S1mipEC4U+G+C2dMXmzetb1UIDaex0a/FXkEn2POKaZ880HOBLaDHcZVw9easDnb Received: from igel.home (ppp-46-244-185-37.dynamic.mnet-online.de [46.244.185.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 4 Aug 2021 18:24:13 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id AA4662C270B; Wed, 4 Aug 2021 18:24:12 +0200 (CEST) From: Andreas Schwab To: Florian Weimer Subject: Re: Async cacellation and pthread_cleanup_push References: <87zgtxuxa8.fsf@igel.home> <87fsvp9qcz.fsf@oldenburg.str.redhat.com> <87tuk5tcw8.fsf@igel.home> <87fsvp6vis.fsf@oldenburg.str.redhat.com> X-Yow: It's strange, but I'm only TRULY ALIVE when I'm covered in POLKA DOTS and TACO SAUCE... Date: Wed, 04 Aug 2021 18:24:12 +0200 In-Reply-To: <87fsvp6vis.fsf@oldenburg.str.redhat.com> (Florian Weimer's message of "Wed, 04 Aug 2021 18:10:19 +0200") Message-ID: <87pmuttbyr.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: , Cc: libc-alpha@sourceware.org Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" On Aug 04 2021, Florian Weimer wrote: > * Andreas Schwab: > >> On Aug 04 2021, Florian Weimer wrote: >> >>> * Andreas Schwab: >>> >>>> Is pthread_cleanup_push supposed to work together with async >>>> cancellation? >>> >>> In our implementation? I think so. >> >> I don't see how that can work with -fexceptions or in C++, though. Is >> that supported? > > I think it is supposed to work, but it probably is unreliable. Since the compiler puts the exception regions only over function calls (and -fnon-call-exceptions only covers potentially trapping insns in addition) the cleanup region will not be fully covered. >>> POSIX doesn't require it, though. >> >> Chapter and verse? > > 2.9.5 Thread Cancellation, Thread Cancellation Cleanup Handlers and > Async-Cancel Safety. The first section calls pthread_cleanup_push a > function, the second section does not list it. > >> Then the LTP test is INVALID. > > Which test? It could be a test for Linux extension. testcases/open_posix_testsuite/conformance/interfaces/pthread_cancel/3-1.c Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."