assertion failures

Archie Cobbs archie at
Tue Jul 28 10:23:21 PDT 1998

Patrick A Tullmann writes:
> You're probably running off the end of the stack because of recursive
> calls---it looks like function 0x3e3128 is the culprit.  Cool thing is
> that the object at the end of the stack is the thread context, so
> that'll get trashed, followed by whatever else has been allocated
> after that... all bets are off at this point.
>  ...
> This is an known problem with Kaffe.  In the interpreter you can stick
> sanity checks like the following in machine.c.  In the JIT'r, on the
> other hand....

Hmm.. it would be nice if an infinite loop was caught with an out
of memory exception, instead of a core dump.

How hard would this be to fix?

Possible solutions:

 - Compile in code at the beginning of each method to check the
   stack pointer (this could be done optionally, controlled by
   a command line argument). It should have a negligible effect
   on speed.

 - Put each thread stack in its own memory mapped region with
   unmapped pages on either side

Seems like #1 ought to be fairly easy, since kaffe is already
compiling a bunch of machine code for each method anyway...


Archie Cobbs   *   Whistle Communications, Inc.  *

More information about the kaffe mailing list