[Gc] OS X patch against 6.8: segfault fix

Boehm, Hans hans.boehm at hp.com
Thu Oct 26 17:52:51 PDT 2006


Thanks.  And sorry for the delay.

Clearly the new code is better than the old.

I assume that task_threads() implicitly allocates vm of exactly the
required size?  This seems a bit brittle in that if you get the size
wrong, it will fail very rarely.  Hence I wanted to double-check ...

The code would look slightly clearer to me if the deallocation code at
the end also used prev_list and prevcount, making it clear that it's
just doing the same cleanup as in the loop.

Hans



> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Allan Hsu
> Sent: Thursday, October 05, 2006 5:53 PM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] OS X patch against 6.8: segfault fix
> 
> My patch for the OS X mach port leak from June introduced a 
> bug where GC_stop_world in darwin_stop_world.c would free 
> memory before it was read, causing non-deterministic segfault 
> behaviour. I've attached a patch against 6.8 that I think 
> fixes the problem. Could somebody vet it and merge it with their tree?
> 
> -Allan
> 



More information about the Gc mailing list