(fyi) SEGV in jc1 for java.util.Date (from jikes bytecode only)
Sandro Hawke
sandro@roads.org
Sun May 9 05:13:00 GMT 1999
(I'm trying to sneak jdk 1.1 and 1.2 features in, by first compiling
the .java to .class files.)
I used jikes (0.47) to compile java.util.Date (from jdk1.2), and then
tried to use gcj to compile the resulting class file. SEGV. When I
compile the .java to a .class using jdk's javac, gcj works fine,
correctly giving the error:
java/util/Date.java: In class `java.util.Date':
java/util/Date.java: In method `toString()':
java/util/Date.java:965: Cannot find file for class java.lang.ref.SoftReference.
java/util/Date.java:965: failed to find class 'java.lang.ref.SoftReference'
Anyway, SEGV is here:
================================================================
[sandro@vorlon52 java]# uname -a # RedHat 5.2, running under vmware
Linux vorlon52.roads.org 2.0.36 #1 Tue Oct 13 22:17:11 EDT 1998 i686 unknown
[sandro@vorlon52 java]# gdb /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.21/jc1
GNU gdb 4.17.0.4 with Linux/x86 hardware watchpoint and FPU support
Copyright 1998 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-redhat-linux"...
(gdb) run classes.out/java/util/Date.class -g1 -version -fCLASSPATH=classes.out -o /tmp/cc31haaa.s
Starting program: /usr/local/lib/gcc-lib/i686-pc-linux-gnu/egcs-2.93.21/jc1 classes.out/java/util/Date.class -g1 -version -fCLASSPATH=classes.out -o /tmp/cc31haaa.s
GNU Java version egcs-2.93.21 19990508 (gcc2 ss-980929 experimental) (i686-pc-linux-gnu) compiled by GNU C version egcs-2.93.21 19990508 (gcc2 ss-980929 experimental).
options passed: -g1 -fCLASSPATH=classes.out
options enabled: -fpeephole -ffunction-cse -fkeep-static-consts
-fpcc-struct-return -fnew-exceptions -fcommon -fgnu-linker
-fargument-alias -fident -m80387 -mhard-float -mno-soft-float -mieee-fp
-mfp-ret-in-387 -mschedule-prologue -mcpu=pentiumpro -march=pentium
class java.util.Date class java.lang.Object clone() class java.util.Calendar class java.lang.CloneNotSupportedException class java.lang.Exception class java.lang.Throwable
java/util/Date.java: In class `java.util.Date':
java/util/Date.java: In method `clone()':
java/util/Date.java:281: warning: Some bytecode operations (starting at pc 34) can never be executed
UTC(int,int,int,int,int,int)
java/util/Date.java: In method `UTC(int,int,int,int,int,int)':
java/util/Date.java:318: warning: Some bytecode operations (starting at pc 55) can never be executed
java/util/Date.java:318: warning: Some bytecode operations (starting at pc 72) can never be executed
Program received signal SIGSEGV, Segmentation fault.
0x809e927 in find_exception_handler_labels () at ../../source-05-08/gcc/except.c:2340
2340 for (x = exception_handler_labels; x; x = XEXP (x, 1))
(gdb) bt
#0 0x809e927 in find_exception_handler_labels () at ../../source-05-08/gcc/except.c:2340
#1 0x8079436 in rest_of_compilation (decl=0x8224edc) at ../../source-05-08/gcc/toplev.c:3818
#2 0x8062433 in end_java_method () at ../../../source-05-08/gcc/java/decl.c:1661
#3 0x806ed6f in parse_class_file () at ../../../source-05-08/gcc/java/jcf-parse.c:728
#4 0x806f1da in yyparse () at ../../../source-05-08/gcc/java/jcf-parse.c:886
#5 0x80786d1 in compile_file (name=0xbffffd69 "classes.out/java/util/Date.class") at ../../source-05-08/gcc/toplev.c:3246
#6 0x807b969 in main (argc=7, argv=0xbffffc50) at ../../source-05-08/gcc/toplev.c:5422
(gdb)
================================================================
I'd send along the .class file in question, but I'm not sure what kind
of clean-room proceedures you might be using.
- sandro
More information about the Java
mailing list