[Gc] valgrind-enabled gctest aborts on Fedora 15

Bruce Hoult bruce at hoult.org
Tue May 10 02:36:29 PDT 2011


2011/5/10 Ivan Maidanski <ivmai at mail.ru>:
> Yes. This is expected - it is ok for GC to use uninitiated data in gc_push_root.

It's not a really great thing, but there isn't a lot of difference
between scanning uninitialized data for possible pointers and scanning
things that contain generic non-pointer data for possible pointers.

The statistical danger of retaining a heap object that should not be
retained is there in both cases (unless the "uninitialized" data in
fact contains zeroes or similar) but the collector should certainly
not crash or do anything else strange.

The GC is also powerless to prevent these valgrind warnings. If you
don't want them to happen then the user of the GC (or possibly their
compiler or runtime system) would have to initialize all memory
regions before adding them to the GC roots.


More information about the Gc mailing list