[Gc] [patch] fix possible merge error

Boehm, Hans hans.boehm at hp.com
Tue Jan 9 13:00:23 PST 2007


That was actually an intentional change on my part.  They should be
provably equivalent.  The current version repeats the code from inside
the loop, which I think makes the structure of the code clearer.  It
took me a while to understand the original.

Unless I introduced a bug here, I'd like to leave this the way it is.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Andreas Tobler
> Sent: Tuesday, January 09, 2007 12:50 PM
> To: Boehm-gc; allan at counterpop.net
> Subject: [Gc] [patch] fix possible merge error
> 
> Hi all,
> 
> I'm not sure if the attached is correct, but comparing to the 
> original patch from Allan Hsu and the cvs version it seems to 
> me the attached should be the correct way, Allan?
> 
> 
> 2007-01-09  Andreas Tobler  <a.tobler at schweiz.org>
> 
> 	* darwin_stop_world.c (GC_stop_world): Fix merge error.
> 
> Index: darwin_stop_world.c
> ===================================================================
> RCS file: /cvsroot/bdwgc/bdwgc/darwin_stop_world.c,v
> retrieving revision 1.9
> diff -u -r1.9 darwin_stop_world.c
> --- darwin_stop_world.c 14 Dec 2006 21:51:40 -0000      1.9
> +++ darwin_stop_world.c 9 Jan 2007 20:46:30 -0000
> @@ -443,9 +443,9 @@
>           prevcount = listcount;
>         }
>       } while (changes);
> -    GC_ASSERT(prev_list != 0);
> -    for(i = 0; i < prevcount; i++)
> -      mach_port_deallocate(my_task, prev_list[i]);
> +    GC_ASSERT(act_list != 0);
> +    for(i = 0; i < listcount; i++)
> +      mach_port_deallocate(my_task, act_list[i]);
> 
>       vm_deallocate(my_task, (vm_address_t)act_list,
>       sizeof(thread_t) * listcount);
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list