This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug symtab/18903] GDB crashes upon reading debug info


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]