J
Jim
Going crazy.
Trying to use the jnistubs code as found in the Solaris JNI book - it's been
modified for linux.
We can use it to run things like printf with several parameter variations,
but when we attempt to execute functions in our own shared library, we crash
with a segv 11.
The Main.java calls a ecrtr_initS() with several parms and it returns OK -
all this function is write some info to a file (and the file is written).
Main.java then calls a ecrtr_init(), again with several parms. ecrtr_init()
calls ecrtr_initF(int) which calls init_Global(void). All init_Global does
is set a bunch of global variables.
The segv always occurs in the instruction "personality = -1;"; but if I move
that around or comment out the entire call, it fails somewhere else.
The shared lib is fairly complex, with threads and SSL, but it never even
gets to that complicated part.
We use jdk1.4.2_09 and linux kernel 2.4.21 (also tried with 2.6 kernel).
It sort of smells like a stack corruption, but haven't been able to pinpoint
it - BTW, it works great on Win32.
Anybody else had any troubles like this with the jnistubs on linux?
Thanks for any help.
Trying to use the jnistubs code as found in the Solaris JNI book - it's been
modified for linux.
We can use it to run things like printf with several parameter variations,
but when we attempt to execute functions in our own shared library, we crash
with a segv 11.
The Main.java calls a ecrtr_initS() with several parms and it returns OK -
all this function is write some info to a file (and the file is written).
Main.java then calls a ecrtr_init(), again with several parms. ecrtr_init()
calls ecrtr_initF(int) which calls init_Global(void). All init_Global does
is set a bunch of global variables.
The segv always occurs in the instruction "personality = -1;"; but if I move
that around or comment out the entire call, it fails somewhere else.
The shared lib is fairly complex, with threads and SSL, but it never even
gets to that complicated part.
We use jdk1.4.2_09 and linux kernel 2.4.21 (also tried with 2.6 kernel).
It sort of smells like a stack corruption, but haven't been able to pinpoint
it - BTW, it works great on Win32.
Anybody else had any troubles like this with the jnistubs on linux?
Thanks for any help.