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: gcj, gij; dynamic compile problem?


Steve,

What does the stack look like if you let it go.

I decided to figure out why it was throwing an exception in the first place.

It seems things have gone to hell in frame 19 as the pointer to the class to instaciate is 0x1, which is not a valid pointer.

Some where in "new" the pointer to java::lang::OutOfMemoryError is lost if it existed in the first place.

#20 0x403debb9 in _Jv_CreateJavaVM(void*) () at ../../../libjava/prims.cc:914
914 no_memory = new java::lang::OutOfMemoryError;


#19 0x403ddccc in _Jv_AllocObject (klass=0x1, size=1245795905) at ../../../libjava/prims.cc:403
403 jobject obj = _Jv_AllocObjectNoFinalizer (klass, size);


Any suggestions on how to debug this further?

#0 0x00080800 in ?? ()
#1 0x403eb972 in _Jv_Throw (value=0x807afa0) at ../../../libjava/exception.cc:100
#2 0x403fcb3d in java::lang::Class::forName(java::lang::String*, bool, java::lang::ClassLoader*) (className=0x809df78,
initialize=1 '\001', loader=0x80acfc0) at ../../../libjava/java/lang/natClass.cc:83
#3 0x403fcbfd in java::lang::Class::forName(java::lang::String*) (className=0x4a415641) at ../../../libjava/java/lang/natClass.cc:110
#4 0x403c5e42 in gnu.gcj.convert.UnicodeToBytes.getDefaultEncoder() () at ../../../libjava/gnu/gcj/convert/UnicodeToBytes.java:49
#5 0x40442147 in java.io.OutputStreamWriter.OutputStreamWriter(java.io.OutputStream) (this=0x4a415641, out=0x4a415641)
at ../../../libjava/java/io/OutputStreamWriter.java:127
#6 0x4044437c in java.io.PrintWriter.PrintWriter(java.io.OutputStream) (this=0x80978d0, out=0x4a415641)
at ../../../libjava/java/io/PrintWriter.java:121
#7 0x404443bf in java.io.PrintWriter.PrintWriter(java.io.OutputStream, boolean) (this=0x2, out=0x4a415641)
at ../../../libjava/java/io/PrintWriter.java:136
#8 0x40443c17 in java.io.PrintStream.PrintStream(java.io.OutputStream, boolean) (this=0x809dfa8, out=0x8097b00)
at ../../../libjava/java/io/PrintStream.java:120
#9 0x40426498 in java.lang.System.<clinit>() () at ../../../libjava/java/lang/System.java:141
#10 0x403fe2ad in java::lang::Class::initializeClass() (this=0x80978d0) at ../../../libjava/java/lang/natClass.cc:831
#11 0x405c9987 in _Jv_InitClass (klass=0x4a415641) at ../../../libjava/java/lang/Class.h:265
#12 0x40425bdd in java.lang.System.getProperty(java.lang.String) (key=0x8079f00) at ../../../libjava/java/lang/System.java:400
#13 0x40429160 in java.lang.Throwable.<clinit>() () at ../../../libjava/java/lang/Throwable.java:403
#14 0x403fe2ad in java::lang::Class::initializeClass() (this=0x80978d0) at ../../../libjava/java/lang/natClass.cc:831
#15 0x403fe25f in java::lang::Class::initializeClass() (this=0x80978d0) at ../../../libjava/java/lang/Class.h:265
#16 0x403fe25f in java::lang::Class::initializeClass() (this=0x80978d0) at ../../../libjava/java/lang/Class.h:265
#17 0x403fe25f in java::lang::Class::initializeClass() (this=0x80978d0) at ../../../libjava/java/lang/Class.h:265
#18 0x403ddc91 in _Jv_AllocObjectNoFinalizer (klass=0x80978d0, size=20) at ../../../libjava/java/lang/Class.h:265
#19 0x403ddccc in _Jv_AllocObject (klass=0x1, size=1245795905) at ../../../libjava/prims.cc:403
#20 0x403debb9 in _Jv_CreateJavaVM(void*) () at ../../../libjava/prims.cc:914
#21 0x403decaf in _Jv_RunMain(java::lang::Class*, char const*, int, char const**, bool) (klass=0x8049b60, name=0x0, argc=134838480,
argv=0x1, is_jar=false) at ../../../libjava/prims.cc:958
#22 0x403dee4b in JvRunMain (klass=0x4a415641, argc=1245795905, argv=0x4a415641) at ../../../libjava/prims.cc:996
#23 0x08048936 in main (argc=1, argv=0xbffff874) at /tmp/ccXDeDLD.i:11
#24 0x42017499 in __libc_start_main () from /lib/i686/libc.so.6




Jeff Sturm wrote:
On Mon, 23 Jun 2003 weppnesp@eckerd.edu wrote:

it got caught in thread purgatory, do i need to debug with a special
option for static?


You could try "handle SIGRT32 nostop noprint" at the gdb prompt.


109		  code = (*fs.personality) (1, _UA_SEARCH_PHASE, exc->exception_class,
(gdb)

Program received signal SIGSEGV, Segmentation fault.
0x00006000 in ?? ()


Now that is strange... looks as though it cannot reach the personality
routine.  When compiling with -fPIC, the unwind info looks like:

        .byte   0x9b    # Personality (indirect pcrel sdata4)
        .long   DW.ref.__gcj_personality_v0-.
...
        .hidden DW.ref.__gcj_personality_v0
        .weak   DW.ref.__gcj_personality_v0
DW.ref.__gcj_personality_v0:
        .long   __gcj_personality_v0

Your crash is as if pc-relative unwind data isn't decoded properly.  But
this configuration seems to work for others, so... I really can't say
what's going wrong.

Jeff




--
Steve Pribyl
Steve AT NetFuel dot com
Computer Infrastructure Practitioner


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