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


tsuraan wrote:
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
                                          ^^^^^^^^^^^^^^^^^^^^
Yeah, I've seen that before.

As aph said it is likley bad DWARF unwinding data.

Someone will need the assembly and/or object file for a small test case to examine the DWARF frame data.

David Daney


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