From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by sourceware.org (Postfix) with ESMTPS id 59ACD385735D for ; Fri, 23 Sep 2022 14:01:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 59ACD385735D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62a.google.com with SMTP id r18so838008eja.11 for ; Fri, 23 Sep 2022 07:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=a4SwK3GUCT/Rp4/xGVD30qsKVAAJ+BwuSG5PqrU4B7I=; b=TEh56OeIRYfotO0OjljpOo0Gax2xgkSDGnLfohYxqKn6keTqe1rkGVxqQUvlWTGyU0 V133ri7noYIc2+Z9Or1Sfu3MDgEykkmgnrWgLDG9Mi0ngjpi6DIvxS2O3O4ERMF6OiO/ OMtelHbajo3VHd6jbOmSdF80dEZrF9zc85L1DY1t4w9RbXTeSvA+f4CGIqZFJxY9ul/z LgQ231/ygP3MHbM1Y6OmqKXgMX4+4ZE5mmhSGorEBoHsvv0yckpAXL2ABgp+va5PYwrc HCiqEP/pRvB/aK8i5Uv4CBd26PKZzB6Pfk5l7veeHneZaE8yhddAqxIwbf6HSlsK/1PT 7dUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=a4SwK3GUCT/Rp4/xGVD30qsKVAAJ+BwuSG5PqrU4B7I=; b=ZOrRm+gLREEBFlV2FhZStXhjxsx5JmIBwjTEENoRXpJtZof1r1xhe/XfsnSs3s1lUQ 48/5cWPJ6+gYJLiH3Z1fcJyPj3htsQ9qrZILUG7B68doH7WAT9X4O1qDmTE3wfWwCRvX m1uD0wb6RrsjZwEqX7gj8Jz7LJN42NQstkQC+5DmdaJurYNvbdRJVhUo7iasLUdRAoAc YJIPOiCuCxf7vrLpr6flaVr6FlEIOc6fnk1bJiWbofldNydytrpc0mT7OYlZCnIRcNdW UA7dgotmwm5SrBd31j/oDWOoGY9wwiicmkvbSb+BTR7NqWpKhp6EwF/3OGTSNTM6e8MA IfXg== X-Gm-Message-State: ACrzQf3tW1rlid4RlX6mypvr4fZMpKD7/FsoCHkKJlpi5Tg3PJG7Cah7 iOrMe5vHyLwshO6RMATDm0Pf0vPPoCrUAnh24P8= X-Google-Smtp-Source: AMsMyM7iC1qMGPn1vibn/RxaDjgPrfsh3CYiK4GwdpdfiimrEQBHUPmY5IRuGcVoJ/fIm7KOcS0fTmXma6I83pc1Xc4= X-Received: by 2002:a17:907:1628:b0:782:28e8:856c with SMTP id hb40-20020a170907162800b0078228e8856cmr7127965ejc.643.1663941688191; Fri, 23 Sep 2022 07:01:28 -0700 (PDT) MIME-Version: 1.0 References: <88e489d8-4248-75de-6e8e-af6f152da61b@in.tum.de> In-Reply-To: <88e489d8-4248-75de-6e8e-af6f152da61b@in.tum.de> From: David Edelsohn Date: Fri, 23 Sep 2022 10:01:09 -0400 Message-ID: Subject: Re: [PATCH] Avoid depending on destructor order To: Thomas Neumann Cc: Jason Merrill , GCC Patches Content-Type: multipart/alternative; boundary="000000000000406f8b05e9589d32" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,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: --000000000000406f8b05e9589d32 Content-Type: text/plain; charset="UTF-8" On Fri, Sep 23, 2022 at 9:38 AM Thomas Neumann wrote: > > 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 */ > The comment should end with full stop and two spaces. > +static const bool in_shutdown = false; > I'll let Jason or others decide if this is the right solution. It seems that in_shutdown also could be declared outside the #ifdef and initialized as "false". Thanks, David > > /* The unseen_objects list contains objects that have been registered > but not yet categorized in any way. The seen_objects list has had > --000000000000406f8b05e9589d32--