From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: "Kévin Le Gouguec" <legouguec@adacore.com>,
"Simon Marchi" <simon.marchi@polymtl.ca>
Subject: Re: [PATCH] Guard against frame.c destructors running before frame-info.c's
Date: Tue, 15 Nov 2022 18:03:02 -0700 [thread overview]
Message-ID: <87v8nfbtix.fsf@tromey.com> (raw)
In-Reply-To: <4065164f-f473-1c9d-7b24-2420b00f47a3@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Tue, 15 Nov 2022 16:57:32 -0500")
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)
next prev parent reply other threads:[~2022-11-16 1:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-15 20:48 Kévin Le Gouguec
2022-11-15 21:57 ` Simon Marchi
2022-11-15 22:32 ` Kévin Le Gouguec
2022-11-16 1:03 ` Tom Tromey [this message]
2022-11-16 1:19 ` Simon Marchi
2022-11-16 7:05 ` Kévin Le Gouguec
2022-11-16 14:39 ` Simon Marchi
2022-11-16 16:25 ` Kévin Le Gouguec
2022-11-16 16:28 ` Simon Marchi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v8nfbtix.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=legouguec@adacore.com \
--cc=simon.marchi@polymtl.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).