[kaffe] kaffe 1.0.6, JNI & pthreads

Godmar Back gback at cs.utah.edu
Mon May 6 11:28:09 PDT 2002


Generally, you need to use the same threading system in your C code
that the VM uses.  Sun/IBM use pthreads, so there's no problem.
Even if you fix the StackOverflow, don't expect it work.

Not sure if the current kaffe does unix-pthreads properly.
There was some port, but it wasn't complete if I recall.
By default, Kaffe uses user-level threads ("jthreads").

At a higher level, this shows that JNI really is nowhere near
a standard - it doesn't say nearly enough about how JNI code and
the VM code are supposed to coexist in the same address space.

	- Godmar

> 
> hi,
> 
> I have a problem with the java native interface and kaffe 1.0.6.
> 
> The following jni tasks are working without any problems: calling
> a jni function from the java side and calling a java method from
> the jni side. But if I try to call a java method out of a pthread,
> which was created in a jni function previously, kaffe will crash
> with an 'java/lang/StackOverflowError'. If I use the sun jdk it
> works properly (see below).
> 
> 




More information about the kaffe mailing list