JNI on ARM/XScale
Bryce McKinlay
mckinlay@redhat.com
Thu Sep 30 15:51:00 GMT 2004
Jari Korva wrote:
>Thanks! The filename seems to get corrupted already before dlopen:
>>-----
>void
>java::lang::Runtime::_load (jstring path, jboolean do_search)
>...
>> lt_dlhandle h;
> // FIXME: make sure path is absolute.
> {
> // Synchronize on java.lang.Class. This is to protect the class chain
>from
> // concurrent modification by class registration calls which may be
>run
> // during the dlopen().
> JvSynchronize sync (&java::lang::Class::class$);
> h = do_search ? lt_dlopenext (lib_name) : lt_dlopen (lib_name);
> }
>...
>-----
>>The value of lib_name is "libhello" before call to JvSynchronize and
>corrupted afterwards.
>
Hmm, so if you printf() lib_name immediately before and after the
JvSynchronize(), it prints the correct value before the call and
corrupted afterwards? If so, that sounds like a C++ compiler bug, as a
value on the stack is somehow being overwritten.
You could try building natRuntime.cc with -O0 to confirm this theory.
Bryce
More information about the Java
mailing list