-
Bug
-
Resolution: Fixed
-
P2
-
1.2.0
-
1.2beta3
-
generic, sparc
-
solaris_2.5.1
-
Verified
Name: laC46010 Date: 02/11/98
The following JCK-12ea2 test cause VM crash under JDK1.2beta3E, and JDK1.2beta3.
All the crashes are caused by some use of array types which item type is an interface,
for example, by use of "instanceof" operator or conversion to the array type.
Failure kind Construct causing crash
---------------------------------------------------------------------------------------------
lang/CONV/conv083/conv08301/conv08301.html VM crash x instanceof SomeInterface [] []
lang/EXPR/expr380/expr38002/expr38002.html VM crash u instanceof SomeInterface []
lang/CONV/conv079/conv07904/conv07904.html VM crash r1 = (conv07904i[])r2
lang/CONV/conv083/conv08302/conv08302.html VM crash u = (AnotherInterface []) x[0];
lang/CONV/conv083/conv08303/conv08303.html VM crash v = (Subinterface []) u[1];
lang/CONV/conv083/conv08304/conv08304.html VM crash v = (AnotherInterface []) u
lang/EXPR/expr057/expr05701/expr05701.html VM crash u[i] = new AbstractClass[i];
lang/EXPR/expr058/expr05801/expr05801.html VM crash u[i] = new AbstractClass[i];
See also an reduced example below.
-----------------------a.java-------------------------
interface SomeInterface {}
class AClass implements SomeInterface {}
public class a {
public static void main(String args[]) {
SomeInterface [] u = new SomeInterface [5];
AClass [] z = new AClass[10];
System.out.println("begin");
u = (SomeInterface []) z;
System.out.println("end");
if ( !(z instanceof SomeInterface []) ) {
System.out.println("instanceof");
}
System.out.println(u);
}
}
------------------------------------------------------
> java -fullversion
java full version "JDK-1.2beta3-F"
> javac -d . a.java
> java -verify a
begin
end
SIGSEGV 11* segmentation violation
si_signo [11]: SIGSEGV 11* segmentation violation
si_errno [0]: Error 0
si_code [1]: SEGV_MAPERR [addr: 0x0]
stackbase=F0000000, stackpointer=EFFFE868
Full thread dump:
"CachedReference sweeper" (TID:0xee301010, sys_thread_t:0x8a708, state:CW) prio=9
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:315)
at java.lang.Runtime.waitForMemoryAdvice(Runtime.java:569)
at java.lang.ref.CachedReference$Sweeper.run(CachedReference.java:346)
at java.lang.Thread.run(Thread.java:490)
"Finalizer" (TID:0xee300510, sys_thread_t:0x76bf8, state:CW) prio=8
at java.lang.Object.wait(Native Method)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:86)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:99)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:131)
"Reference handler" (TID:0xee300310, sys_thread_t:0x687a0, state:CW) prio=10
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:315)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:198)
"Async Garbage Collector" (TID:0xee300450, sys_thread_t:0x6dbb0, state:R) prio=1
"Idle thread" (TID:0xee300400, sys_thread_t:0x6da88, state:R) prio=0
"Clock" (TID:0xee300270, sys_thread_t:0x5bc88, state:CW) prio=12
"main" (TID:0xee3002a0, sys_thread_t:0x21118, state:R) prio=5 *current thread*
at a.main(a.java:9)
Monitor Cache Dump:
Registered Monitor Dump:
utf8 hash table: <unowned>
JNI pinning lock: <unowned>
JNI global reference lock: <unowned>
BinClass lock: <unowned>
Class linking lock: <unowned>
System class loader lock: <unowned>
Code rewrite lock: <unowned>
Heap lock: <unowned>
Monitor IO lock: <unowned>
Child death monitor: <unowned>
Event monitor: <unowned>
I/O monitor: <unowned>
Alarm monitor: <unowned>
Waiting to be notified:
"Clock" (0x5bc88)
Sbrk lock: <unowned>
Thread queue lock: <unowned>
Monitor registry: owner "main" (0x21118, 1 entry)
Thread Alarm Q:
Abort (core dumped)
Hook 5(hook5): test
======================================================================
- duplicates
-
JDK-4112047 The code (blah instanceof <interface>[]) crashes 1.2beta3
- Closed