This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
library compiled using g++ causing problems
- From: "SRINATH,VIJAY (HP-India,ex2)" <vijay_srinath at hp dot com>
- To: "'gcc-bugs at gcc dot gnu dot org'" <gcc-bugs at gcc dot gnu dot org>
- Date: Fri, 14 Jun 2002 15:54:31 +0530
- Subject: library compiled using g++ causing problems
hello all,
I have a small java test program that calls a native jni function. The
jni function just throws an exception and has a catch clause which prints a
message. But when the exception is thrown, the jvm crashes. Control never
reaches the catch clause. Iam working on AIX 4.3.3 platform and using java
1.3.1.
I found that this crash happens if i build my native library using g++
(i use gcc version 3.0.3). The program works fine if i use the IBM compiler
- xlC. .
Is this a g++ linker error ? (something to do with any default libraries it
links ?)
Is there any workaround or fix for this ?
I have pasted the native stack details below:
<snip>
SIGABRT received at 0xd0013ff0 in /usr/lib/libpthreads.a. Processing
terminated.
Current Thread Details
----------------------
"main" sys_thread_t:0x3000D2D8
----- Native Stack -----
at 0xD0173324 in fcntl
at 0xD0013FF0 in _p_raise
at 0xD0177210 in raise
at 0xD0170954 in abort
at 0xD1D09A54 in _ZN10__cxxabiv111__terminateEPFvvE
at 0xD1D09ADC in _ZSt9terminatev[DS]
at 0xD1D09DAC in __cxa_throw
at 0xD14E6278 in Java_jniTest_TestFunc
at 0xD280CA90 in mmisInvoke_V_VHelper
at 0xD282B918 in entryCmp
<snip>
To build the library, i use the command:
g++ -shared -o libjniTest.so jniTest.c -I/opt/java/include -I
Any help most appreciated....
regards
vijay