Review your favorite Linux distribution.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 01-04-2013, 04:15 AM   #1
LQ Newbie
Registered: Jan 2012
Location: Mumbai, India
Distribution: Red Hat
Posts: 23

Rep: Reputation: Disabled
Crashes due to native JNI Exception with 64 bit built binary


I am getting a crash when a native exception through JNI is propagated to Java. The source code is really simple and it just throws a native exception. I think the process crashes when it tries to unwind the stack after an exception is thrown. You can see the error below. One more thing, it only happens when the native library is compiled on 64 bit arch, and it does work successfully on 32 bit arch. I am using gcc compiler and stats are mentioned below as well. Let me know if you need more information. One more thing, this code works perfectly well in Linux systems and i could see one compiler option "--disable-libunwind-exceptions" on Linux. Does this option really play any role for these kind of exceptions ? Should we put this option whiling building gcc compiler on Solaris box ?

uname: SunOS
uname -m: i86pc

compiler info
Using built-in specs.
Target: i386-pc-solaris2.10
Configured with: ../gcc-4.6.3/configure --prefix=/usr/local/gcc4 --enable-__cxa_atexit
Thread model: posix
gcc version 4.6.3 (GCC)

From Crash Report:
Stack: [0xfffffd7fffbff000,0xfffffd7fffe00000), sp=0xfffffd7fffdfe4d8, free space=2045k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C 0x00000000000129f5
C [] _Unwind_RaiseException+0x46
C [] __cxa_throw+0x59
C [] Java_testJava_TEST+0xca
j testJava.TEST()I+0
j testJava.main([Ljava/lang/StringV+14
v ~StubRoutines::call_stub
V []
V []
V []
V []
V []
C [java+0x3169] main+0x649
C [java+0x29cc] _PROCEDURE_LINKAGE_TABLE_+0x3e4

library dependencies :
SERVER:/$HOME/simpleJNITest$ldd => /usr/local/gcc4/lib/amd64/ => /lib/64/ => /usr/local/gcc4/lib/amd64/ => /lib/64/

Last edited by gaurav.rustagi; 01-04-2013 at 04:16 AM.
Old 11-09-2017, 07:22 AM   #2
LQ Newbie
Registered: Nov 2017
Posts: 6

Rep: Reputation: Disabled

I got the same problem on the same architecture with the same environment (only gcc version 4.4).
Did you find a solution to this problem? Could you describe solution?


c++, exception, gcc463, java, solaris 10 x86

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
automake,, binary directory, both 32 bit and 64 bit executables? MrUmunhum Linux - Kernel 0 12-26-2011 04:47 PM
64bit binary to be built on 32-bit Linux4 using g++/GCC sachinkusale Linux - Newbie 4 12-23-2009 02:28 AM
Native Open Source Groupware built-in to distribution networkr Linux - Software 2 07-22-2004 03:27 PM
C, read 8 bit octal numbers, convert to 24 bit binary bamalabs Programming 3 01-20-2004 09:59 AM
An unexpected exception has been detected in the native code outside the VM jschwenk Linux - Software 0 08-20-2003 04:51 PM > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 08:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration