[Gc] RE: gc_typed.h allocation incompatible with GC_clear_roots()?
hans.boehm at hp.com
Wed Feb 6 17:04:43 PST 2008
I superficially tested it and checked it in. I agree this was a bug.
I did move the assignment to GC_push_typed_structures into the region in which the allocation lock is held. I think that avoids an unlikely data race, though also one that's extremely unlikely to break things in practice.
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Henning Makholm
> Sent: Wednesday, February 06, 2008 10:43 AM
> To: 'gc at linux.hpl.hp.com'
> Subject: [Gc] Re: gc_typed.h allocation incompatible with
> I wrote:
> > In particular, there does not seem to be any general way
> for a client
> > program that uses GC_clear_roots() to re-add GC-internal
> roots such as
> > GC_ext_descriptors (indeed, if there are more than this one, the
> > linker might choose to scatter them all across the data section).
> On further investigation I have discovered
> GC_push_gc_structures(), which is clearly the place to handle this.
> The attached patch against gc-7.1alpha2-revised.tar.gz ought
> to fix (but I have not tested it; beware of typos).
> Henning Makholm
> OctoShape ApS
More information about the Gc