This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: JNI on ARM/XScale


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]