BZ #26: seg fault running ecj

Status fields:

creation_ts:2006-06-29 22:12
component:unspecified
version:default branch
rep_platform:All
op_sys:Linux
bug_status:RESOLVED
resolution:FIXED
reporter:psj@harker.dyndns.org
Cacao SVN HEAD seg faults for me running ecj 3.1.2:

[psj@localhost CVS]$
/home/psj/software/install/cacao-cvs-20060629-1730/bin/cacao -cp
/home/psj/software/java/apps/eclipse/3.1.2/eclipse/plugins/org.eclipse.jdt.core_3.1.2.ja
r
org.eclipse.jdt.internal.compiler.batch.Main
Segmentation fault (core dumped)

Same ecj install runs fine with Cacao 0.96 release.

First lines of the backtrace using gdb on core file are:

#0  0x00cc0445 in pthread_getspecific () from /lib/libpthread.so.0
#1  0x0063a448 in stacktrace_create_extern_stackframeinfo (sfi=0xbef37068,
    pv=0x0, sp=0xbef37450 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:220
#2  0x0063a896 in stacktrace_hardware_nullpointerexception (pv=0x0,
    sp=0xbef37450 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:575
#3  0x00668492 in md_signal_handler_sigsegv (sig=11, siginfo=0xbef370dc,
    _p=0xbef3715c) at ../../../../../../src/vm/jit/i386/linux/md-os.c:73
#4  0x00a6c440 in __kernel_sigreturn ()
#5  0x0063a470 in stacktrace_create_extern_stackframeinfo (sfi=0xbef37498,
    pv=0x0, sp=0xbef37880 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:248
#6  0x0063a896 in stacktrace_hardware_nullpointerexception (pv=0x0,
    sp=0xbef37880 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:575
#7  0x00668492 in md_signal_handler_sigsegv (sig=11, siginfo=0xbef3750c,
    _p=0xbef3758c) at ../../../../../../src/vm/jit/i386/linux/md-os.c:73
#8  0x00a6c440 in __kernel_sigreturn ()
#9  0x0063a470 in stacktrace_create_extern_stackframeinfo (sfi=0xbef378c8,
    pv=0x0, sp=0xbef37cb0 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:248
#10 0x0063a896 in stacktrace_hardware_nullpointerexception (pv=0x0,
    sp=0xbef37cb0 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:575
#11 0x00668492 in md_signal_handler_sigsegv (sig=11, siginfo=0xbef3793c,
    _p=0xbef379bc) at ../../../../../../src/vm/jit/i386/linux/md-os.c:73
#12 0x00a6c440 in __kernel_sigreturn ()
#13 0x0063a470 in stacktrace_create_extern_stackframeinfo (sfi=0xbef37cf8,
    pv=0x0, sp=0xbef380e0 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:248
#14 0x0063a896 in stacktrace_hardware_nullpointerexception (pv=0x0,
    sp=0xbef380e0 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:575
#15 0x00668492 in md_signal_handler_sigsegv (sig=11, siginfo=0xbef37d6c,
    _p=0xbef37dec) at ../../../../../../src/vm/jit/i386/linux/md-os.c:73
#16 0x00a6c440 in __kernel_sigreturn ()
#17 0x0063a470 in stacktrace_create_extern_stackframeinfo (sfi=0xbef38128,
    pv=0x0, sp=0xbef38510 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:248
#18 0x0063a896 in stacktrace_hardware_nullpointerexception (pv=0x0,
    sp=0xbef38510 "", ra=0x63a470 "\213", xpc=0x63a470 "\213")
    at ../../../../src/vm/jit/stacktrace.c:575
#19 0x00668492 in md_signal_handler_sigsegv (sig=11, siginfo=0xbef3819c,
    _p=0xbef3821c) at ../../../../../../src/vm/jit/i386/linux/md-os.c:73
#20 0x00a6c440 in __kernel_sigreturn ()

This appears to be looping.

This is running on Linux x86.

Comment #1 by psj@harker.dyndns.org on 2006-07-08 12:54:02

Also seg faults with ecj 3.2 standalone jar.

Comment #2 by twisti@complang.tuwien.ac.at on 2006-07-08 16:22:38

There was a missing NULL check in stacktrace creation.  Fix is commited.  Can
you please test it?

Comment #3 by psj@harker.dyndns.org on 2006-07-08 23:17:15

No longer seeing seg fault with latest Cacao SVN HEAD (but I am now seeing an
exception in getSystemClassLoader which appears to be a separate issue).

Comment #4 by twisti@complang.tuwien.ac.at on 2006-07-08 23:37:57

Yes, that bug is fixed too.