patch for JNI wrapper (was: Bug in GC?)
oliva at dcc.unicamp.br
Sun Aug 9 03:04:52 PDT 1998
Alexandre Oliva <oliva at dcc.unicamp.br> writes:
> Hi! I've been hunting a bug in Kaffe JIT on sparc-sun-solaris2.5,
> possibly related with memory management. The program that reproduces
> the problem is a *very* simple one, it's attached.
> It runs perfectly well on i686-pc-linux-gnu, with both engines, and on
> sparc-sun-solaris2.5, with the interpreter engine. However, if I run
> it with the JIT engine, it consistently stops (unreported SIGBUS)
> after a certain small and repeatable number of iterations.
The problem was related with JNI wrapper functions, used only by the
JIT engine. On sparc, the start of the code of JNI wrapper was not
at the beginning of a memory block, because the JIT compiler generated
a few constants. However, the method structure only pointed to the
beginning of the code, so that the code would never be marked, and it
would end up being reclaimed by the garbage collector.
The attached patch fixes this problem, ensuring that the same
mechanism used to install JIT-generated code is used to install the
mailto:oliva at dcc.unicamp.br mailto:aoliva at acm.org
Universidade Estadual de Campinas, SP, Brasil
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1830 bytes
Desc: not available
Url : http://kaffe.org/pipermail/kaffe/attachments/19980809/9fcdbeff/attachment-0006.obj
More information about the kaffe