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: Weird segmentation fault (2)


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

#include <gcj/cni.h>

int main()
{
    JvCreateJavaVM(NULL);
    JvAttachCurrentThread(NULL, NULL);

JvDetachCurrentThread();

    return 0;
}

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

The above code should function, no?

Below are some more details

gbevin at pine callbacks $ ldd main
        libgcj.so.4 => /opt/gcc-3.3-cvs/lib/libgcj.so.4 (0x0f74c000)
        libc.so.6 => /lib/libc.so.6 (0x0f5f1000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0f580000)
        libdl.so.2 => /lib/libdl.so.2 (0x0f55d000)
        libgcc_s.so.1 => /opt/gcc-3.3-cvs/lib/libgcc_s.so.1 (0x0f531000)
        /lib/ld.so.1 => /lib/ld.so.1 (0x30000000)

gbevin at 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 conditions.
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 java::lang::Runtime::insertSystemProperties(java::util::Properties*) (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 http://www.uwyn.com 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 pgp.mit.edu, wwwkeys.pgp.net


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