[Gc] a bug in v.7.1 ?

Glauco Masotti glauco.masotti at libero.it
Tue Mar 1 11:03:47 PST 2011

Hi Bruce.

I made more than that: I disabled the GC! 
A lot of the code has never been tested in this condition, because for years I used to go with the GC, 
however I continued to write the code as if  manual memory management (MMM) could also be used.
Maybe I have some leaks, but hitherto everything seems to go right! I am impressed :-)

But I am so surprised that this problem came out after using 7.1 for years! 
As for 6.6 it behaves the same, while 6.2, contrarily to what I said in my previous mail, only delays the problem.
So, if it's a bug it has been there for a long time, so it's very strange that none has found it before.
If it's not a bug, what can be the cause of this problem, given that with MMM the program behaves correctly?!

--- GM

FYI: I am using VC++ 6.0 with Win XP SP3.

----- Original Message ----- 
From: "Bruce Hoult" <bruce at hoult.org>
To: "Glauco Masotti" <glauco.masotti at libero.it>
Cc: <gc at linux.hpl.hp.com>
Sent: Tuesday, March 01, 2011 6:38 PM
Subject: Re: [Gc] a bug in v.7.1 ?

> On Wed, Mar 2, 2011 at 5:35 AM, Glauco Masotti <glauco.masotti at libero.it> wrote:
>> It happens that I get an allocated array overwritten when writing another
>> array!
>> They should have nothing to do with each other, but in fact they map to
>> overlapping addresses in memory!
>> Well, I don't see how this can happen if not for the fact that the collector
>> considers erroneously the space of the former array as no more used
>> and thus frees it, so that this space is allocated to the latter array.
> Disable GC_free() (for example with "#define GC_free(p) 0") and see if
> it still happens.
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> https://www.hpl.hp.com/hosted/linux/mail-archives/gc/

More information about the Gc mailing list