From: John Marino <binutils@marino.st>
To: Ian Lance Taylor <iant@google.com>
Cc: binutils@sourceware.org
Subject: Re: gold linker 2.22 regressed for DragonFly
Date: Fri, 02 Dec 2011 08:44:00 -0000 [thread overview]
Message-ID: <4ED88FA5.8050408@marino.st> (raw)
In-Reply-To: <mcrmxbbk1rp.fsf@dhcp-172-18-216-180.mtv.corp.google.com>
On 12/2/2011 5:58 AM, Ian Lance Taylor wrote:
> John Marino<binutils@marino.st> writes:
>
> string_to_object_format is being called with a NULL pointer.
>
>> #1 0x000000000053b5e2 in format_enum (this=0x62a5fe)
>> at ../../binutils-2.22/gold/options.cc:937
> This line is
> return General_options::string_to_object_format(this->format());
> so this->format() is return a NULL string.
>
> That should not happen. this->format() is going to return the value of
> this->format_.value. That should be initialized to "elf" and nothing
> should ever change it to NULL. In this case "this" appears to refer to
> the static variable Position_dependent_options::default_options_.
>
> I'm not aware of anything that has changed in this area between binutils
> 2.21 and 2.22. The same code is in 2.21.
>
> I guess I would debug it by verifying that
> Position_independent_options::default_options_.format_.value is in fact
> initialized to "elf". If not, why not? If it is, when does it change?
>
> Ian
I need to stress that gold built with ld does not have this problem.
It's only gold built with gold that segfaults. Does that affect your
answer? By the way, the format initialization is all happening via
macro, so I had to "gcc -E" to even see what it's doing. The code looks
fine to me.
I'll try to analysis gold-by-gold with gdb later to see if I can get to
the elf initiation or if it just skips it altogether. I suspect that
it's never initialized.
John
next prev parent reply other threads:[~2011-12-02 8:44 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 22:16 John Marino
2011-12-02 4:59 ` Ian Lance Taylor
2011-12-02 8:44 ` John Marino [this message]
2011-12-02 14:28 ` Ian Lance Taylor
2011-12-31 16:40 ` John Marino
2012-01-02 2:05 ` Ian Lance Taylor
2012-01-02 9:36 ` John Marino
2012-01-02 18:38 ` Ian Lance Taylor
2012-01-02 19:27 ` John Marino
2012-01-02 19:48 ` John Marino
2012-01-02 22:56 ` John Marino
2012-01-03 9:20 ` gold linker 2.22 regressed for DragonFly [revised testsuite results] John Marino
2012-01-05 18:32 ` Ian Lance Taylor
2012-01-06 10:24 ` John Marino
2012-01-06 14:43 ` Ian Lance Taylor
2012-01-06 20:04 ` John Marino
2012-01-22 18:59 ` John Marino
2012-01-22 19:43 ` Ian Lance Taylor
2012-01-22 20:46 ` John Marino
2012-01-23 16:49 ` Ian Lance Taylor
2012-01-03 19:43 ` gold linker 2.22 regressed for DragonFly Ian Lance Taylor
2012-01-05 17:30 ` John Marino
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=4ED88FA5.8050408@marino.st \
--to=binutils@marino.st \
--cc=binutils@sourceware.org \
--cc=iant@google.com \
/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).