From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout3.rbg.tum.de (mailout3.rbg.tum.de [131.159.0.8]) by sourceware.org (Postfix) with ESMTPS id 991AD3858C52 for ; Fri, 23 Sep 2022 13:38:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 991AD3858C52 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=in.tum.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=in.tum.de Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mailout3.rbg.tum.de (Postfix) with ESMTPS id D1402100005; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=in.tum.de; s=20220209; t=1663940317; bh=UKAxI4fDX74SY0eIDn0kGg2KxlMzNmq07SJRBgKHOzA=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=MjlGbIM2rESjXOyMMfr5qeDLOJZJoa4IpF/0/2KnzLo9g+5++JoJusCBn/zV23iVz rcoXdjeTR21hpLP7CD2+UxJsMR+eMnrYDTxrW8tLgQKi3trz3HVO+Xj/lC6DZkVJUy D+YFyIW33fsEhvTxtwcAmfqlo1GnjOB+Wh1Coye1ZSFiBM/g6dht7qn5Xd1uf32yh+ e8gfAYkrm3eRKRbnCG9BvCYhdHGe+COGPHqiJW1ktz24Ul1NBm2Y9qhZp99jDXQzXi 8vrf3at03szHHJ7PW3BL2zHr1iecB+VJs4AjluWoD0x0lXo2/sRKa9a/WNuMFutxRs +g+y6LbYZMv/A== Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id CE59D1A8; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id ADDA21A1; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) Received: from mail.in.tum.de (mailproxy.in.tum.de [IPv6:2a09:80c0::78]) by mailrelay1.rbg.tum.de (Postfix) with ESMTPS id AC463CD; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) Received: by mail.in.tum.de (Postfix, from userid 112) id A97194A0193; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) Received: (Authenticated sender: neumann) by mail.in.tum.de (Postfix) with ESMTPSA id 7068D4A0144; Fri, 23 Sep 2022 15:38:37 +0200 (CEST) (Extended-Queue-bit xtech_ud@fff.in.tum.de) Message-ID: <88e489d8-4248-75de-6e8e-af6f152da61b@in.tum.de> Date: Fri, 23 Sep 2022 15:38:37 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] Avoid depending on destructor order Content-Language: en-US To: David Edelsohn , Jason Merrill Cc: GCC Patches References: From: Thomas Neumann In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > This patch broke bootstrap on AIX and probably other targets. > > #ifdef ATOMIC_FDE_FAST_PATH > #include "unwind-dw2-btree.h" > > static struct btree registered_frames; > static bool in_shutdown; > ... > #else > > in_shutdown only is defined for ATOMIC_FDE_FAST_PATH but used in code / > asserts not protected by that macro. > >   gcc_assert (in_shutdown || ob); >   return (void *) ob; > } I am sorry for that, I did not consider that my test machines all use the fast path. I think the problem can be fixed by the trivial patch below, I will commit that after I have tested builds both with and without fast path. Best Thomas diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c index d237179f4ea..d6e347c5481 100644 --- a/libgcc/unwind-dw2-fde.c +++ b/libgcc/unwind-dw2-fde.c @@ -67,6 +67,8 @@ static void init_object (struct object *ob); #else +/* Without fast path frame lookup must always succeed */ +static const bool in_shutdown = false; /* The unseen_objects list contains objects that have been registered but not yet categorized in any way. The seen_objects list has had