hints on debugging memory corruption...
Joern Rennecke
joern.rennecke@embecosm.com
Fri Feb 4 18:29:00 GMT 2011
Quoting Tom Tromey <tromey@redhat.com>:
>>>>>> "Basile" == Basile Starynkevitch <basile@starynkevitch.net> writes:
>
> Basile> So I need to understand who is writing the 0x101 in that field.
> One thing to watch out for is that the memory can be recycled. I've
> been very confused whenever I've forgotten this. I have a hack for the
> GC (appended -- ancient enough that it probably won't apply) that makes
> it easy to notice when an object you are interested in is collected.
> IIRC I apply this before the first run, call ggc_watch_object for the
> thing I am interested in, and then see in what GC cycle the real one is
> allocated.
If what you are looking for survives such a change, postponing garbage
collection so it won't happen till the crash can make things simpler.
More information about the Gcc
mailing list