Kaffe/Alpha - bug fix ? finally?

Archie Cobbs archie at whistle.com
Mon Oct 9 20:57:50 PDT 2000

abnay at altavista.com writes:
> Finally it seems like I might have fixed the
> assertion failure that has been bothering me
> on my Linux/Alpha box.
> In gcRealloc():kaffe/kaffevm/mem/gc-incremental.c
> line 1026 it looks like the size of memcpy should
> be size instead of osize. If the osize (original/old
> size ?) is less than size+sizeof(gc_unit) isn't it
> logical to copy size number of bytes instead of
> osize? Anyways I made the fix in my local sources
> and ran 'make check'. 25 tests failed but atleast
> I seem to have gotten past the assertion failure.
> If this is indeed the fix, change line 1026
> in the above said file to 
> memcpy(newmem,mem,size);
> in the CVS tree.

It's good to hear that your assertion failure was fixed,
but your fix sortof doesn't make sense. "osize" is the
correct thing to copy there, because the original memory
region presumably was only "osize" bytes long.

However, there may be some other code that calls gcRealloc()
with the wrong (i.e., too small) value for the "osize" parameter,
causing some data to not get copied.


Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com

More information about the kaffe mailing list