From: Jim Blandy <jimb@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: Re: [rfc] Detect dwarf address size mismatch
Date: Wed, 11 Jul 2007 19:27:00 -0000 [thread overview]
Message-ID: <m31wfeoi5a.fsf@codesourcery.com> (raw)
In-Reply-To: <20070711141912.GA12298@caradoc.them.org> (Daniel Jacobowitz's message of "Wed, 11 Jul 2007 10:19:12 -0400")
Daniel Jacobowitz <drow@false.org> writes:
> I just fixed a gas bug which caused MIPS64 Linux kernels to have
> corrupt DWARF information. The .debug_info compilation unit header
> listed the address size as 4, but the .debug_line section used 64-bit
> addresses. This caused GDB to parse the last four bits of each
> address as if they were instructions in the line number program.
>
> That version of GDB crashed when it got a bogus DW_LNS_set_file with
> an out-of-bounds file number (which has already been fixed in HEAD).
> But I think this patch is still useful, to detect the mismatch
> promptly instead of going off into the woods parsing bad data.
> I think I did get HEAD to crash once while testing.
>
> A more intrusive patch could let GDB handle the bad files as their
> producer intended, by reading an address of size extended_len - 1,
> but I don't think it's worth it when we can fix gas.
>
> Any comments on this patch, or shall I commit it?
Would it make sense to move the check after the extended_op switch
altogether, and always use extended_len to advance line_ptr? This
would make GDB more robust against new extended opcodes.
The complaint is definitely appropriate, though.
next prev parent reply other threads:[~2007-07-11 19:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-11 14:19 Daniel Jacobowitz
2007-07-11 19:23 ` Eli Zaretskii
2007-07-11 19:27 ` Jim Blandy [this message]
2007-07-11 19:41 ` Daniel Jacobowitz
2007-07-11 20:30 ` Jim Blandy
2007-07-17 12:52 ` Daniel Jacobowitz
2007-07-17 13:21 ` Mark Kettenis
2007-07-17 13:55 ` Daniel Jacobowitz
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=m31wfeoi5a.fsf@codesourcery.com \
--to=jimb@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/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