Weird segmentation fault (2)

Geert Bevin
Fri Apr 18 14:20:00 GMT 2003

I continued looking myself and the following code actually segfaults too:

#include <gcj/cni.h>

int main()
     JvAttachCurrentThread(NULL, NULL);


     return 0;

I just compile this with 'gcc -o main -lgcj', execute with 
./main and get a segmentation fault again.

The above code should function, no?

Below are some more details

gbevin@pine callbacks $ ldd main => /opt/gcc-3.3-cvs/lib/ (0x0f74c000) => /lib/ (0x0f5f1000) => /lib/ (0x0f580000) => /lib/ (0x0f55d000) => /opt/gcc-3.3-cvs/lib/ (0x0f531000)
         /lib/ => /lib/ (0x30000000)

gbevin@pine callbacks $ gdb ./main
GNU gdb 5.3
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain 
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "powerpc-unknown-linux-gnu"...
(gdb) run
Starting program: /data/Workspace/bagheera/design/poc/callbacks/main
[New Thread 16384 (LWP 2443)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2443)]
0x0fb8a608 in 
(newprops=0x1005afc8) at cni.h:64
64      cni.h: No such file or directory.
         in cni.h
Current language:  auto; currently c++

Geert Bevin                       Uwyn
"Use what you need"               Lambermontlaan 148               1030 Brussels
gbevin[remove] at uwyn dot com    Tel & Fax +32 2 245 41 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers,

More information about the Java mailing list