This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug symtab/18903] GDB crashes upon reading debug info
- From: "dje at google dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 03 Sep 2015 16:55:40 +0000
- Subject: [Bug symtab/18903] GDB crashes upon reading debug info
- Auto-submitted: auto-generated
- References: <bug-18903-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18903
dje at google dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dje at google dot com
--- Comment #2 from dje at google dot com ---
The attached patch is close.
There's a preceding reference to name that also needs to be protected.
Here's the definition of set_main_name from 7.6 (I didn't have 7.7 readily
available).
void
set_main_name (const char *name)
{
if (name_of_main != NULL)
{
xfree (name_of_main);
name_of_main = NULL;
language_of_main = language_unknown;
}
if (name != NULL)
{
name_of_main = xstrdup (name);
language_of_main = language_unknown;
}
}
I think the thing to do is rewrite set_objfile_main_name to have the same
semantics. [Can't free something from an obstack of course, but otherwise keep
the same semantics.]
--
You are receiving this mail because:
You are on the CC list for the bug.