From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 3hswGbk6dGNL6RgAWB0awg (envelope-from ) for ; Tue, 15 Nov 2022 20:19:53 -0500 Received: by simark.ca (Postfix, from userid 112) id 51F951E124; Tue, 15 Nov 2022 20:19:53 -0500 (EST) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=XDzzpM2I; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id F08561E0D3 for ; Tue, 15 Nov 2022 20:19:52 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 842B2394C836 for ; Wed, 16 Nov 2022 01:19:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 842B2394C836 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668561592; bh=9CyPx5s6luP2g8virr5XJMniTNkY7Dsg81RFB8URfy0=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=XDzzpM2IM1K1fEIdh9u3EUDPuHGTcTBRrcMm/LDiVcwA5c2tJuDfXKAXOSYP1xCs5 3om9gk1sUzZS5zcRo45m9kmv0jrEbGXl+ImaEjAPtvhasIy8Dp70Yb8GlQLFUbn/mu 73+KiMnW4FYUppV5C8AEk4PitqZLGn1qM1yhAPio= Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id C32A3382FCB6 for ; Wed, 16 Nov 2022 01:19:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C32A3382FCB6 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 2AG1JNoU022670 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Nov 2022 20:19:28 -0500 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 2AG1JNoU022670 Received: from [10.0.0.11] (unknown [217.28.27.60]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 396361E0D3; Tue, 15 Nov 2022 20:19:23 -0500 (EST) Message-ID: <9994be80-c436-32ee-f6a3-174858683054@polymtl.ca> Date: Tue, 15 Nov 2022 20:19:22 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH] Guard against frame.c destructors running before frame-info.c's Content-Language: en-US To: Tom Tromey , Simon Marchi via Gdb-patches Cc: =?UTF-8?Q?K=c3=a9vin_Le_Gouguec?= References: <20221115204821.1260141-1-legouguec@adacore.com> <4065164f-f473-1c9d-7b24-2420b00f47a3@polymtl.ca> <87v8nfbtix.fsf@tromey.com> In-Reply-To: <87v8nfbtix.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 16 Nov 2022 01:19:23 +0000 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/15/22 20:03, Tom Tromey wrote: > Simon> Do you have a way to reproduce, so we can experiment with it? > > Since it's sort of like a C++ static initializer problem, it's dependent > on how the linker happens to order the relevant destructors. > > For me, the appended reproduces the problem on Linux, because it changes > the relative ordering of frame.o and frame-info.o in the link. > > Tom > > diff --git a/gdb/Makefile.in b/gdb/Makefile.in > index fb4d42c7baa..72527f4363f 100644 > --- a/gdb/Makefile.in > +++ b/gdb/Makefile.in > @@ -2138,7 +2138,7 @@ stamp-init: $(INIT_FILES) config.status $(srcdir)/make-init-c > # against that. > # > # init.o is very important. It pulls in the rest of GDB. > -LIBGDB_OBS = $(sort $(COMMON_OBS)) init.o > +LIBGDB_OBS = $(COMMON_OBS) init.o > libgdb.a: $(LIBGDB_OBS) > -rm -f libgdb.a > $(AR) q libgdb.a $(LIBGDB_OBS) Thanks, this reproduces for me too. The patch looks good to me: Approved-By: Simon Marchi Simon