From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: "H.J. Lu" Newsgroups: gmane.comp.lib.glibc.alpha Subject: Re: [PATCH 0/2] nptl: Update struct pthread_unwind_buf Date: Sun, 25 Feb 2018 05:23:26 -0800 Message-ID: References: <20180201205757.51911-1-hjl.tools@gmail.com> <4abf9786-1879-f16c-5a01-3261cd718d63@redhat.com> <87inb7pug7.fsf@mid.deneb.enyo.de> <2a02aac9-6aa3-4dc6-b122-039ae85365e8@redhat.com> <87d11emoap.fsf@mid.deneb.enyo.de> <878tc2mkgr.fsf@mid.deneb.enyo.de> <90d3ee18-c292-117f-a0c1-7822e340ca02@redhat.com> <87a7vyjsqv.fsf@mid.deneb.enyo.de> <87vaelbetu.fsf@mid.deneb.enyo.de> <87fu5pb7ql.fsf@mid.deneb.enyo.de> <877er1b4zp.fsf@mid.deneb.enyo.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1519564893 17414 195.159.176.226 (25 Feb 2018 13:21:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Feb 2018 13:21:33 +0000 (UTC) Cc: "Carlos O'Donell" , GNU C Library To: Florian Weimer Original-X-From: libc-alpha-return-90562-glibc-alpha=m.gmane.org@sourceware.org Sun Feb 25 14:21:28 2018 Return-path: Envelope-to: glibc-alpha@blaine.gmane.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=g1Fi qPfEqZ0WUkMuwnSdiWe9ydRCn1dFVbFmVO/mAXoo6wSbIjx9ofRBdSOGiCbpps66 q4JTG7zZE2hrE9s3yCHfwwR6MRV/0ZELJyVEjqu7O+31k9r1WrXHbLtzgIcN/M2E /lPkPs3lvtYA7w7ryAp65fFzaRf122SAvx5EvIU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; s=default; bh=jNTieMMrLO OzFDPp41ly1y1/MJU=; b=RyOrbdimy16A9d1CpBz8ihPNkAD7eC2ZSfc9G0oeey GJnaYYAbHCHu+Ovdh8tGMyxc1eHzo/OVf+BEjeY1x8lJqqebdDvtEe4ncKR2LheU sEgLWblc5t/s6cRPB+GCIQenW7atW5my2y7SAdCz+hqkdNTUjCZSnAqePp6JdSI1 4= Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Original-Sender: libc-alpha-owner@sourceware.org Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=swallow X-HELO: mail-oi0-f43.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TvBDMK3ohEAPoLwcZ9Jwj3jSij8/QjhJ0XwJz1uVVs4=; b=VgBPFCCkEGX7g08CLqoE3R5y8JPW04UZCxUIkPbpYVzHvXIniaprkT6AH/W+QO+e7O OUlq/5mFvN/XV2PaV/4003lw7s+Xu8BS7+0f2dMgDcE5FJhsgO1sAYXFQcllnOOJXjsG en0qEGvQM8cE7XRWVrHkw32LEs/T+k8ZMvGA+ax+64edK9yhE9EsvpJpwJ7iyjhO+bQK mQpdIls85JgOmnbgs0GbkEzUOUIKXpiWf9wUy/SYm8SSx7rmWNNzpPTyjwTRfMLx59Ff QR1IKWJARPeO+bykwgdtCLc+veqYOFUbJHpV1tT2DRmCVFKsf4ICcyqI4te1GKidUGgk O5+w== X-Gm-Message-State: APf1xPCAC/BW6R/f6Hc5yMsdJqyKHO6G6E1BaNVpkVgG/ZZaWs9fHIXf I55ViqbcnYBzwLnWfatHfjwTQ57WN4NkIx/vIcF1VQ== X-Google-Smtp-Source: AG47ELtgM4Kl7eT1H/AIZvM0/1BP8YgQz6Qb/fWW1pXEHqLMdxSiNFbcapEIffZ5O/1Tdd02SEfH+nzJinhsaOyCZgA= X-Received: by 10.202.253.135 with SMTP id b129mr5040352oii.100.1519565007355; Sun, 25 Feb 2018 05:23:27 -0800 (PST) In-Reply-To: <877er1b4zp.fsf@mid.deneb.enyo.de> Xref: news.gmane.org gmane.comp.lib.glibc.alpha:82894 Archived-At: Received: from server1.sourceware.org ([209.132.180.131] helo=sourceware.org) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epwF6-00041r-0L for glibc-alpha@blaine.gmane.org; Sun, 25 Feb 2018 14:21:28 +0100 Received: (qmail 22276 invoked by alias); 25 Feb 2018 13:23:31 -0000 Received: (qmail 22267 invoked by uid 89); 25 Feb 2018 13:23:30 -0000 On Sun, Feb 25, 2018 at 4:58 AM, Florian Weimer wrote: > * H. J. Lu: > >> Let me rephrase. Can a function, which contains cancellation points, >> return to its caller after cancellation happened? > > I don't think it can. It's undefined to use longjmp to jump out of a > cancellation handler. On the C++ side, we make sure that the > unwinding always proceeds, even across catch (...) blocks which > swallow the exception. libpthread cancellation implementation passes cancel_jmp_buf to libgcc unwinder, which saves and restores shadow stack register for C++ exception. How can libgcc unwinder tell when to save and restore shadow stack register? -- H.J.