This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: 3.2 bootstrap failure in libjava on sparcv9-sun-solaris2.8


In article <200205302053.g4UKrhh27847@banach.math.purdue.edu> you write:

>>    OK, mainline still doesn't bootstrap today, and I decided to try to narrow
>>    down where the problem is, so I fired up gdb, but the program exited
>>    with an error status rather than actually segfaulting, so I couldn't see
>>    where it was failing.

>>    How is one supposed to debug this?

>> Set a breakpoint on 'exit' perhaps? :-)

> This is what it gives me on the failure:

> (gdb) backtrace
> #0  0xffffffff7f3a4398 in exit () from /usr/lib/64/libc.so.1

> Doesn't seem too useful.

Hi Brad,

I think Dave was trying to be helpful but I see the disconnect in your
communications.  The problem is that you were running gdb on the
compiler driver not the actual compiler pass which cores.  Here is one
technique you can use:

1. If ``gcc -c l.c'' cores, then run ``gcc -c -save-temps -v l.c''.

2. From the verbose output of step 1, cut-n-paste the name/path of the
   coring pass ala ``gdb $(prefix)/lib/gcc-lib/$(target)/$(version)/cc1''

3. From the verbose output of step 1, cut-n-paste the arguments of the
   coring pass ala
   ``run -fpreprocessed l.i -quiet -dumpbase l.c -version -o l.s''

[FYI, someone submitted a patch within the last week to allow one to
 pass a switch to the compiler driver to run all passes under gdb.]

Here is a transcript following the above rules:

; /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/gcj -B/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava/ -B/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/ --encoding\=UTF-8 -fclasspath\= -fbootclasspath\=/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava -ffloat-store -g -O2 -MD -MT java/util/HashMap.lo -MF java/util/HashMap.d -c /usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java -fPIC -c -save-temps -v -o java/util/.libs/HashMap.o
Reading specs from /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/specs
Reading specs from /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava/libgcj.spec
rename spec lib to liborig
Configured with: /usr/users/rittle/outside-cvs-src/gcc-mainline/configure --prefix=/usr/local/beta-gcc --with-gnu-as --with-as=/usr/local/beta-gcc/bin/as --with-gnu-ld --with-ld=/usr/local/beta-gcc/bin/ld
Thread model: posix
gcc version 3.2 20020528 (experimental)
 /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/jc1 /usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -dumpbase HashMap.java -g -O2 -version -fencoding=UTF-8 -fclasspath= -fbootclasspath=/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava -ffloat-store -fPIC -MD -MT java/util/HashMap.lo -MF java/util/HashMap.d -o HashMap.s
GNU Java version 3.2 20020528 (experimental) (i386-unknown-freebsd4.6)
        compiled by GNU C version 3.2 20020528 (experimental).
Class path starts here:
    ./
    /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava/ (system)
/usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java: In class `java.util.HashMap':
/usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java: In method `java.util.HashMap.rehash()':
/usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java:796: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

; /usr/local/beta-gcc/bin/gdb -nw /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/jc1
GNU gdb 2002-02-05-cvs
Copyright 2002 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-unknown-freebsd4.4"...
(gdb) run /usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -dumpbase HashMap.java -g -O2 -version -fencoding\=UTF-8 -fclasspath\= -fbootclasspath\=/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava -ffloat-store -fPIC -MD -MT java/util/HashMap.lo -MF java/util/HashMap.d -o HashMap.s
Starting program: /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/gcc/jc1 /usr/users/rittle/outside-cvs-src/gcc-mainline/libjava/java/util/HashMap.java -fhash-synchronization -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -quiet -dumpbase HashMap.java -g -O2 -version -fencoding\=UTF-8 -fclasspath\= -fbootclasspath\=/usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava -ffloat-store -fPIC -MD -MT java/util/HashMap.lo -MF java/util/HashMap.d -o HashMap.s
GNU Java version 3.2 20020528 (experimental) (i386-unknown-freebsd4.6)
        compiled by GNU C version 3.2 20020528 (experimental).
Class path starts here:
    ./
    /usr/users/rittle/tmp/gcc-build-latour-mainline-0528/i386-unknown-freebsd4.6/libjava/ (system)

Program received signal SIGSEGV, Segmentation fault.
0x081be6f6 in estimate_probability (loops_info=0xbfbfe500)
    at /usr/users/rittle/outside-cvs-src/gcc-mainline/gcc/predict.c:431
431             if (TEST_BIT (loop->nodes, bb->index))
(gdb) The program is running.  Exit anyway? (y or n) y


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