[Gc] Possible problem in `GC_is_valid_displacement'?

Emmanuel Stapf [ES] manus@eiffel.com
Tue, 13 May 2003 18:06:05 -0700


Thanks it works perfectly now.

Manu

> -----Original Message-----
> From: gc-admin@napali.hpl.hp.com 
> [mailto:gc-admin@napali.hpl.hp.com] On Behalf Of Boehm, Hans
> Sent: Monday, May 12, 2003 5:32 PM
> To: 'manus@eiffel.com'; gc@napali.hpl.hp.com
> Subject: RE: [Gc] Possible problem in `GC_is_valid_displacement'?
> 
> 
> I agree.  This is a bug in GC_is_valid_displacement.  Thanks 
> for reporting it.
> 
> Please try the attached patch.  (The second change is 
> substantive, the first is a minor cleanup.)
> 
> Hans
> 
> > -----Original Message-----
> > From: Emmanuel Stapf [ES] [mailto:manus@eiffel.com]
> > Sent: Saturday, May 10, 2003 7:41 PM
> > To: gc@napali.hpl.hp.com
> > Subject: [Gc] Possible problem in `GC_is_valid_displacement'?
> > 
> > 
> > Hi,
> > 
> > I've been using `GC_is_valid_displacement' and found that the
> > following code fails
> > on Win32 with 6.1 and GC_WIN32_THREADS and of course 
> > ALL_INTERIOR_POINTERs
> > disabled.
> > 
> > {
> > 	char * toto = NULL;
> > 	GC_register_displacement(8);
> > 	toto = GC_malloc (1248);
> > 	GC_is_valid_displacement(toto);
> > 	GC_is_valid_displacement(toto + 8);
> > }
> > 
> > It fails on both call to `GC_is_valid_displacement'. The
> > bizarre thing is that it
> > does not do it on all blocks, but it does it when I allocate 
> > 1248 bytes.
> > 
> > Although the test fails, commenting it out and my application
> > just works fine.
> > 
> > Regards,
> > Manu
> > 
> > 
> > _______________________________________________
> > Gc mailing list
> > Gc@linux.hpl.hp.com 
> > http://linux.hpl.hp.com/cgi-bin/mailman/listinfo/gc
> > 
> 
>