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] | |
On Thu, 30 Sep 2004, Bryce McKinlay wrote:
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.
Thanks again! I removed -O2 from libjava/Makefile, touched natRuntime.cc
and ran make again. Then I rebuild my JNI-HelloWorld - and it really
worked!
> I also tried printfs instead of debugger on -O2 optimized binary. That > way, it seems that the value is corrupted already before JvSynchronize. > The trace and modified source are below (the most bizarre thing is that it > jumps directly from trace 3-1 to 4).
There's nothing weird about that: all it means is that you're getting
an ArrayIndexOutOfBoundsException. This is Bad.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |