This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Java compiler crashes in integrate.c
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Java compiler crashes in integrate.c
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Sat, 20 Oct 2001 18:55:28 -0700
/home/zack/src/b/gcc_ni/gcc/jc1 ../../../../gcc_new-i18n/libjava/java/net/URL.java -fhash-synchronization -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase URL.java -g -O2 -version -fencoding=UTF-8 -fassume-compiled -fclasspath=/home/zack/src/b/gcc_ni/i686-pc-linux-gnu/libjava -ffloat-store -fPIC -MD -MT java/net/URL.lo -MF java/net/URL.d -o /tmp/ccP6RKwj.s
GNU Java version 3.1 20011020 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 3.1 20011020 (experimental).
Class path starts here:
/home/zack/src/b/gcc_ni/i686-pc-linux-gnu/libjava/
../../../../gcc_new-i18n/libjava/java/net/URL.java: In class `java.net.URL':
../../../../gcc_new-i18n/libjava/java/net/URL.java: In method `java.net.URL.readObject(java.io.ObjectInputStream)':
../../../../gcc_new-i18n/libjava/java/net/URL.java:406: 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.
Program received signal SIGSEGV, Segmentation fault.
0x0819271d in copy_insn_notes (insns=0x40342ac0, map=0x8a43e60,
eh_region_offset=0) at ../../../gcc_new-i18n/gcc/integrate.c:1689
1689 XEXP (note, 0) = GEN_INT (INTVAL (XEXP (note, 0))
(gdb) p note
$1 = 0x40361100
(gdb) call debug_rtx (note)
(insn_list:REG_EH_REGION 0 (nil))
(gdb) call debug_rtx (insn)
(call_insn 507 506 509 (set (reg:SI 0 eax)
(call (mem:QI (symbol_ref:SI
("_ZN4java4lang5Class7forNameEPNS0_6StringE")) [0])
(const_int 4 [0x4]))) -1 (nil)
(insn_list:REG_EH_REGION 1 (nil))
(nil))
The assumption is clearly that the car of a REG_EH_REGION note will be
non-NULL (and in fact will definitely be a CONST_INT rtx).
We're attempting to expand setURLStreamHandler inline into
java.net.URL.readObject(java.io.ObjectInputStream).
In the initial RTL dump, setURLStreamHandler appears, and the area
surrounding insn 507 looks like this:
(note 501 500 504 1 NOTE_INSN_EH_REGION_BEG)
(note 504 501 506 ("../../../../gcc_new-i18n/libjava/java/net/URL.java") 381)
(insn 506 504 507 (set (mem/f:SI (reg/f:SI 56 virtual-outgoing-args) [0 S4])
(reg/v/f:SI 128)) -1 (nil)
(nil))
(call_insn 507 506 509 (set (reg:SI 0 eax)
(call (mem:QI (symbol_ref:SI
("_ZN4java4lang5Class7forNameEPNS0_6StringE")) [0])
(const_int 4 [0x4]))) -1 (nil)
(nil)
(nil))
but it vanishes from the .02.eh dump - presumably it was being
deferred for reconsideration at EOF, which we never got to.
The same crash appears to happen for several other files:
make[2]: *** [java/net/URLClassLoader.lo] Error 1
make[2]: *** [java/security/KeyPairGenerator.lo] Error 1
make[2]: *** [gnu/java/rmi/server/UnicastRef.lo] Error 1
unfortunately libtool does its braindead "redirect compiler output to
/dev/null" thing for those three so I am not certain.
zw