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: [re] Java executables can abort trying to access a null pointer in a leaf function


> Just run the thing under GDB,  Set most signals (other than SIGABRT) to
> noprint nostop pass.  Then print the trace when gdb stops in the abort.

Invoking gdb with

LD_LIBRARY_PATH=/opt/gcc-4.1/lib gdb ./nullpointer

When I run I get

Starting program: /home/tsuraan/java/abort/nullpointer
Cannot find thread 2: Thread ID=1, generic error

My gdb version is

GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 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 "i386-marcel-freebsd".

A backtrace of the program that showed me this bug (a python program
using PyLucene) is:

#0  0x2822f31b in pthread_testcancel () from /usr/lib/libpthread.so.1
#1  0x28220145 in sigaction () from /usr/lib/libpthread.so.1
#2  0x2821a1dd in pthread_kill () from /usr/lib/libpthread.so.1
#3  0x28219bac in raise () from /usr/lib/libpthread.so.1
#4  0x282eac1b in abort () from /lib/libc.so.5
#5  0x28e5800c in _Jv_Throw (value=0x8c06ac8)
    at ../../../gcc-4.1-20051029/libjava/exception.cc:111
#6  0x28e4c873 in _Jv_ThrowNullPointerException ()
    at ../../../gcc-4.1-20051029/libjava/prims.cc:359
#7  0x08b63048 in ?? ()
#8  0x286647c7 in org::apache::lucene::store::FSIndexInput::close ()
   from ./_PyLucene.so
#9  0x28664819 in org::apache::lucene::store::FSIndexInput::finalize ()
   from ./_PyLucene.so
#10 0x28e81c36 in _Jv_FinalizeObject (obj=0x8b53f30)
    at ../../../gcc-4.1-20051029/libjava/java/lang/natObject.cc:121
#11 0x28e8b6e2 in call_finalizer (obj=0x8b53f30, client_data=0x28e81c18)
    at ../../../gcc-4.1-20051029/libjava/boehm.cc:527
#12 0x29361e1c in GC_invoke_finalizers ()
    at ../../../gcc-4.1-20051029/boehm-gc/finalize.c:787
#13 0x28e8ba15 in _Jv_RunFinalizers ()
    at ../../../gcc-4.1-20051029/libjava/boehm.cc:540
#14 0x28e77827 in gnu::gcj::runtime::FinalizerThread::run (this=0x8aeeb18)
    at ../../../gcc-4.1-20051029/libjava/gnu/gcj/runtime/natFinalizerThread.cc:60
#15 0x28e86256 in _Jv_ThreadRun (thread=0x8aeeb18)
    at ../../../gcc-4.1-20051029/libjava/java/lang/natThread.cc:299
#16 0x28e8cf9d in really_start (x=0x2936b264)
    at ../../../gcc-4.1-20051029/libjava/posix-threads.cc:398
#17 0x08b37ff8 in ?? ()
#18 0x2936b264 in GC_start_routine (arg=0x8ad1fe0)
    at ../../../gcc-4.1-20051029/boehm-gc/pthread_support.c:1185
#19 0x2821baf1 in pthread_create () from /usr/lib/libpthread.so.1
#20 0x282d6253 in _ctx_start () from /lib/libc.so.5

I don't know how helpful that is, considering that it's a totally
different program, but my compter isn't very happy with debugging the
simple example quite yet.  I'll keep working on that and send a
backtrace when I figure out how to generate one.


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