Similar to bug 1153892, but seems slightly different.
Environment
jikes-1.22-1
White Box Enterprise Linux release 3.0 (Liberation)
Intel(R) Pentium(R) 4 CPU 2.80GHz
1.5 GB RAM
2.4 kernel
Scenario
A very simple class A that imports class B, where class
B is in the classpath. But class B implements an
interface C which is not in the classpath.
Compiling class A causes a segfault. If class C is
added to the classpath, compilation succeeds.
I reproduced with both 1.4.2.05 and 1.4.2.08 .
Output
[erikw@gx270-erikw-01 jikes-case]$ jikes -classpath
$JAVA_HOME/jre/lib/rt.jar:path1 -d path3/
path3/CompiledClass.java
Segmentation fault
[erikw@gx270-erikw-01 jikes-case]$ jikes -classpath
$JAVA_HOME/jre/lib/rt.jar:path1:path2 -d path3/
path3/CompiledClass.java
[erikw@gx270-erikw-01 jikes-case]$ jikes -verbose
-classpath $JAVA_HOME/jre/lib/rt.jar:path1 -d path3/
path3/CompiledClass.java
[read path3/CompiledClass.java]
[read path1/mypkg/ReferencedClass.class]
[read
/usr/java/j2sdk1.4.2_08/jre/lib/rt.jar/java/lang(Object.class)]
Segmentation fault
[erikw@gx270-erikw-01 jikes-case]$ gdb jikes
GNU gdb Red Hat Linux (5.3.90-0.20030710.40rh)
Copyright 2003 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-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".
(gdb) run -classpath $JAVA_HOME/jre/lib/rt.jar:path1 -d
path3/ path3/CompiledClass.java
Starting program: /usr/bin/jikes -classpath
$JAVA_HOME/jre/lib/rt.jar:path1 -d path3/
path3/CompiledClass.java
Program received signal SIGSEGV, Segmentation fault.
0x0817d7dc in SymbolSet::Union(SymbolSet const&) ()
(gdb) where
#0 0x0817d7dc in SymbolSet::Union(SymbolSet const&) ()
#1 0x080b71d4 in
Semantic::ProcessClassFile(TypeSymbol*, char const*,
unsigned, unsigned) ()
#2 0x080b5f41 in Semantic::ReadClassFile(TypeSymbol*,
unsigned) ()
#3 0x080daa69 in Semantic::ReadType(FileSymbol*,
PackageSymbol*, NameSymbol*, unsigned) ()
#4 0x080dceda in
Semantic::ProcessImportQualifiedName(AstName*) ()
#5 0x080dde99 in
Semantic::ProcessSingleTypeImportDeclaration(AstImportDeclaration*)
()
#6 0x080d515c in Semantic::ProcessImports() ()
#7 0x080d378d in Semantic::ProcessTypeNames() ()
#8 0x080ccdd6 in Control::ProcessHeaders(FileSymbol*) ()
#9 0x080ccc5e in Control::ProcessFile(FileSymbol*) ()
#10 0x080c5309 in Control::Control(char**, Option&) ()
#11 0x08159fd8 in JikesAPI::compile(char**) ()
#12 0x08159549 in main ()
(gdb)
reproduction case