[Q] Assertion failure on Linux/Alpha

Jason Baker jbaker at cs.utah.edu
Wed Oct 11 13:28:45 PDT 2000


abnay at altavista.com writes:

> > As long as pointers are 4 bytes, the newly allocated object
> > has room for this junk.  

To clarify:  gcRealloc was copying sizeof(gc_unit) many extra bytes
from oldmem to mem.  This bug is innocuous unless either: 
a. sizeof(gc_unit) (2 pointers) > the difference between the sizes
   of mem and oldmem (at least 8 bytes)  (writing the extra bytes
   trashes the next header), or
b. oldmem is the last object on the last page of the heap (reading
   the extra bytes causes a page fault)

> This statement bothers me a little bit. Does this
> mean that there is an implicit assumption in kaffe
> that a pointer is 4 bytes long? And is this the

I wouldn't call it an implicit assumption, but it related to pointer
size. 

> reason why it fails on Alpha where a pointer size
> is 8 ( sizeof(void *) is 8)? I remember some one
> reporting the exact same assertion failure on
> Tru64 Unix (which ofcourse runs only on Alpha) also.
> Consequently, it doesn't break on 32-bit machines?
> 

It can manifest itself on 32-bit machines, but usually doesn't.

Jason


More information about the kaffe mailing list