Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* TYPE_NAME memory management
@ 2009-09-04 21:18 Doug Evans
  2009-09-04 22:42 ` Tom Tromey
  2009-09-04 22:44 ` Joel Brobecker
  0 siblings, 2 replies; 9+ messages in thread
From: Doug Evans @ 2009-09-04 21:18 UTC (permalink / raw)
  To: Paul Pluzhnikov; +Cc: gdb

On Fri, Sep 4, 2009 at 11:03 AM, Doug Evans<dje@google.com> wrote:
> On Fri, Sep 4, 2009 at 10:59 AM, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:
>> On Fri, Sep 4, 2009 at 8:25 AM, Paul Pluzhnikov<ppluzhnikov@google.com> wrote:
>>
>>> I am still working on a stand-alone repro case.
>>
>> Here it is:
>>
>>[...]
>> Segmentation fault (core dumped)
>>
>> I will not be able to work on a fix before next Tuesday, so if anybody
>> fixes this before then, please let me know.

Memory management for TYPE_NAME and TYPE_TAG_NAME is a bit random.

E.g.
bash$ grep "TYPE_NAME *(.*) *= " *.c
bash$ grep "TYPE_TAG_NAME *(.*) *= " *.c

Sometimes it's a string constant, sometimes it's in malloc space,
sometimes it's on objfile's obstack, and now sometimes it can live in
mmap'd space.

Obviously one would rather not place ordering constraints on objfile
data cleanups.  All the above uses are "ok" (modulo any memory leaks
from malloc'd strings) except for the new mmap'd values, so it seems
like the thing to do for now is copy such strings onto the objfile's
obstack.
I'm not sure what the speed loss will be, but I think it's the thing
to do pending data that says something more clever is needed.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-09 17:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-04 21:18 TYPE_NAME memory management Doug Evans
2009-09-04 22:42 ` Tom Tromey
2009-09-04 22:54   ` Doug Evans
2009-09-04 23:04     ` Joel Brobecker
2009-09-09 16:40   ` Doug Evans
2009-09-09 17:30     ` Paul Pluzhnikov
2009-09-09 17:38       ` Doug Evans
2009-09-09 17:46     ` Tom Tromey
2009-09-04 22:44 ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox