Nested stack problem
Archie Cobbs
archie at whistle.com
Wed Jul 12 18:40:00 PDT 2000
James writes:
> Ok, I got around the longjmp/setjmp problem w/ Mozilla by building Kaffe
> w/ --with-threads=unix-pthreads.
>
> Things were moving along well when my OJI plugin was a huge monolithic
> function. Now I am breaking it down so that it intiailizes in the correct
> order (ie., a single JavaVM instance, multiple plugin instances).
>
> The problem is that if I initialize the JVM within a nested function call,
> and then attempt to use the JVM environment from a function that is nested
> less than the call which initialized the JVM, the app segfaults.
This sounds vaguely familiar..
If I understand correctly, the problem is that kaffe uses the thread
inherited from initialization as the first Java thread. Instead, it
should really create a new system thread for the first Java thread,
and then return within the initialization thread.
It might not be too hard to modify kaffe's initialization to do this,
if that in fact would solve your problem.
-Archie
___________________________________________________________________________
Archie Cobbs * Whistle Communications, Inc. * http://www.whistle.com
More information about the kaffe
mailing list