[Gc] moving from 6.8->7.0 getting smashed objects

Boehm, Hans hans.boehm at hp.com
Mon Jul 9 11:49:23 PDT 2007

I think the algorithm for detecting smashed objects has not changed.
Lots of other things, including object placement, no doubt have.  It's
quite conceivable that either:

1) Other changes cause the overwrite to be noticed in 7.0 but not 6.8
2) There is another bug in 7.0

I would hope that it wouldn't take that long to debug this from the
smashed object messages?  It should be fairly easy to determine where
objects in the vicinity were allocated.  If the problem is repeatable
enough, a watchpoint on the overwritten location might even work.

If it starts to look like this might be a collector problem, please


> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of jim marshall
> Sent: Sunday, July 08, 2007 8:48 PM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] moving from 6.8->7.0 getting smashed objects
> I was hoping to migrate our application to use GC 7.0 for our 
> next release. I built the Linux library with the following 
> configure script
> ./configure --prefix=/home/jmars/wbem/wsi/thirdparty/memory/70dbg
> --exec-prefix=/home/jmars/wbem/wsi/thirdparty/memory/70dbg
> --enable-gc-assertions --enable-full-debug --enable-static=no 
> --enable-threads=posix --enable-thread-local-alloc
> I tried with and without the 'thread-local-alloc' as our 6.8 
> compilation did not have that.
> I then rebuilt my application using the new libgc.so.1.0.3. 
> When I start the application and as I run through code I get 
> a list of smashed objects, however; under gc 6.8 the 
> application runs fine with no smashed objects detected.  I do 
> not doubt that we are doing this, I just wanted to ask if GC 
> 7.0 has a new algorithm for detecting smashed objects which 
> is better then 6.8 (I suspect yes) and if anyone else is 
> experiencing this?  I wanted to ask before I spend a ton of 
> time trying to track these down.
> Thank you again!
> -Jim
> p.s.
> When I do the above configure the build is being done with -g 
> -O2, I did not expect the "-O2" to be there for debug builds:
> > gcc -DPACKAGE_NAME=\"gc\" -DPACKAGE_TARNAME=\"gc\" 
> > -DPACKAGE_VERSION=\"7.0\" "-DPACKAGE_STRING=\"gc 7.0\"" 
> > -DPACKAGE_BUGREPORT=\"Hans.Boehm at hp.com\" -DGC_VERSION_MAJOR=7 
> -fexceptions -I 
> > ./libatomic_ops/src -g -O2 -MT os_dep.lo -MD -MP -MF 
> .deps/os_dep.Tpo 
> > -c os_dep.c  -fPIC -DPIC -o .libs/os_dep.o
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list