From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6076C3858CDA; Mon, 26 Sep 2022 05:44:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6076C3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664171088; bh=CHBeD8NGvNjABlFEk5Vm3ykGmz4cTqVKYbj6tjq+F7U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E/qDs4xFq1dsUu2RQoZVJNL6g35o8iJ/FtWI4+dkyHH4WOUrgkI/AVtDF6En4gsbg OlzHE6XSPnLtSmnen4epYza92jl7/GJN4zhqjGMSn6w8PsRTB2AIpJSJaOp6q8YCUz yL6mpUyvlxhGWVscZgHm8TsOondDa496WVIl20lw= From: "tneumann at users dot sourceforge.net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/107026] [13 Regression] gcc_assert (in_shutdown || ob); build failure for i586-msdosdjgpp target Date: Mon, 26 Sep 2022 05:44:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: build X-Bugzilla-Severity: normal X-Bugzilla-Who: tneumann at users dot sourceforge.net X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107026 --- Comment #6 from Thomas Neumann = --- I have a patch ready, I am waiting for approval: https://gcc.gnu.org/pipermail/gcc-patches/2022-September/602130.html When using the atomic fast path deregistering can fail during program shutdown if the lookup structures are already destroyed. The assert in __deregister_frame_info_bases takes that into account. In the non-fast-path case however is not aware of program shutdown, which caused a compiler error on such platforms. We fix that by introducing a constant for in_shutdown in non-fast-path builds. libgcc/ChangeLog: * unwind-dw2-fde.c: Introduce a constant for in_shutdown for the non-fast-path case. --- libgcc/unwind-dw2-fde.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libgcc/unwind-dw2-fde.c b/libgcc/unwind-dw2-fde.c index d237179f4ea..0bcd5061d76 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 deregistration must always succeed. */ +static const int in_shutdown =3D 0; /* The unseen_objects list contains objects that have been registered but not yet categorized in any way. The seen_objects list has had --=20 2.34.1=