Segfault in org::w3c::dom::Node::class

Khiraly khiraly123@gmx.net
Thu Oct 6 10:32:00 GMT 2005


Hi!

I have a small bot, and I wanted to compile with gcj. 
I managed it with the following command:
gcj-4.0 --main=org.epointsystem.puli.bot.Watch @files -o lol.out

Normally the program have only one parameter: the path of the config
file (config.xml)

./lol.out config.xml

And the program abort:
hub@elite:~/dcw/dcwforras$ ./lol.out config.xml
*** DCWatch 0.1.2d
Aborted
hub@elite:~/dcw/dcwforras$

I can run with java (sdk 1.4) without problem.
Here is the output of ldd:
hub@elite:~/dcw/dcwforras$ ldd lol.out
        linux-gate.so.1 =>  (0xffffe000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4001f000)
        libgcj.so.6 => /usr/lib/libgcj.so.6 (0x4002a000)
        libm.so.6 => /lib/tls/libm.so.6 (0x41108000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4112e000)
        libz.so.1 => /usr/lib/libz.so.1 (0x41141000)
        libdl.so.2 => /lib/tls/libdl.so.2 (0x41153000)
        libc.so.6 => /lib/tls/libc.so.6 (0x41157000)
        /lib/ld-linux.so.2 (0x40000000)

Here is the output of gdb:
(gdb) run config.xml
Starting program: /home/hub/dcw/dcwforras/lol.out config.xml
[Thread debugging using libthread_db enabled]
[New Thread 1093204192 (LWP 13521)]
[New Thread 1103940528 (LWP 13525)]
*** DCWatch 0.1.2d

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1093204192 (LWP 13521)]
0x0805f465 in org::w3c::dom::Node::class$ ()
(gdb) bt
#0  0x0805f465 in org::w3c::dom::Node::class$ ()
#1  0x08053ae4 in org.epointsystem.puli.common.dc.util.Config.getStringElement(java.lang.String) ()
#2  0x080539ce in org.epointsystem.puli.common.dc.util.Config.getBoolElement(java.lang.String) ()
#3  0x0804cfb3 in org.epointsystem.puli.bot.Hub.Hub(org.epointsystem.puli.bot.Watch) ()
#4  0x08053129 in org.epointsystem.puli.bot.Watch.Watch(java.lang.String) ()
#5  0x080534c3 in org.epointsystem.puli.bot.Watch.main(java.lang.String[]) ()
#6  0x406784fb in gnu::java::lang::MainThread::call_main ()
   from /usr/lib/libgcj.so.6
#7  0x406b4fe6 in gnu::java::lang::MainThread::run ()
   from /usr/lib/libgcj.so.6
#8  0x40688036 in _Jv_ThreadRun () from /usr/lib/libgcj.so.6
#9  0x4064c9f5 in _Jv_RunMain () from /usr/lib/libgcj.so.6
#10 0x4064cb40 in _Jv_RunMain () from /usr/lib/libgcj.so.6
#11 0x4064cb78 in JvRunMain () from /usr/lib/libgcj.so.6
#12 0x0804b191 in main ()
(gdb) quit

I have put online the source code (78 kB):
http://khiraly.4242.hu/tmp/dcw.tar.gz

Quick guide how to test it:
tar -xzvf dcw.tar.gz
cd dcwforras
gcj-4.0 --main=org.epointsystem.puli.bot.Watch @files -o lol2.out
./lol2.out config.xml

My packages version:
ii  gcj-4.0        4.0.2-2        The GNU compiler for Java(TM)
ii  libgcj6-dev    4.0.2-2        Java development headers and static library
ii  libgnujaxp-jav 1.3-4          free implementation of jaxp api
ii  libgnujaxp-jni 1.3-4          native bindings for gnujaxp to libxml2 and l

Im on debian SID.
Let me know if I missed any important information.

My question is, that is it a bug in the gcj, or it comes from some
misversioned debian packages, or is it a bug in my program?

Can somebody test, that it segfaults on her system too ?

Any feedback, opinion, remark are really welcome.

Best regards, 
 Khiraly



More information about the Java mailing list