{
1 : m3;
2 : m4;
9 : m3;
default: m3
};
m3: iconst_2;
ireturn;
m4: iconst_0;
ireturn;
ireturn;
}
Method expectObject:"(Ljava/io/ObjectInputStream;)V"
stack 4 locals 3
{
try t6, t54;
aload_1;
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
endtry t6, t54;
return;
catch t6 java/io/OptionalDataException;
astore_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
new class java/lang/StringBuffer;
dup;
ldc String "Unexpected OptionalDataException, length = ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_2;
getfield Field java/io/OptionalDataException.length:"I";
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
ldc String ", eof = ";
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
aload_2;
getfield Field java/io/OptionalDataException.eof:"Z";
invokevirtual Method java/lang/StringBuffer.append:"(Z)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
aload_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokevirtual Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V";
return;
catch t54 java/lang/Exception;
astore_2;
aload_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokevirtual Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V";
return;
}
Method expectData:"(Ljava/io/ObjectInputStream;I)V"
throws java/io/IOException, java/lang/ClassNotFoundException
stack 4 locals 5
{
try t15;
aload_1;
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
ldc String "Incorrect value, expected data, found an object.";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
endtry t15;
return;
catch t15 java/io/OptionalDataException;
pop;
iload_2;
iconst_1;
isub;
istore_3;
goto L71;
L23: aload_1;
invokevirtual Method java/io/ObjectInputStream.readByte:"()B";
istore 4;
iload 4;
iload_3;
if_icmpeq L68;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
new class java/lang/StringBuffer;
dup;
ldc String "Incorrect byte, expected ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
iload_3;
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
ldc String " found ";
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
iload 4;
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
L68: iinc 3, -1;
L71: iload_3;
ifge L23;
return;
}
Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V"
throws java/io/IOException
stack 2 locals 4
{
iload_2;
iconst_1;
isub;
istore_3;
goto L15;
L7: aload_1;
iload_3;
invokevirtual Method java/io/ObjectOutputStream.writeByte:"(I)V";
iinc 3, -1;
L15: iload_3;
ifge L7;
return;
}
public Method equals:"(Ljava/lang/Object;)Z"
stack 1 locals 2
{
aload_1;
ifnull L11;
aload_1;
instanceof class PrimitivesTest;
ifne L13;
L11: iconst_0;
ireturn;
L13: aload_1;
checkcast class PrimitivesTest;
pop;
iconst_1;
ireturn;
}
public Method toString:"()Ljava/lang/String;"
stack 3 locals 1
{
new class java/lang/StringBuffer;
dup;
ldc String "integer = ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_0;
getfield Field integer:"I";
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
areturn;
}
public static Method main:"([Ljava/lang/String;)V"
stack 2 locals 1
{
new class reloc00104;
dup;
invokespecial Method "<init>":"()V";
invokevirtual Method run:"()I";
pop;
return;
}
public Method "<init>":"()V"
stack 2 locals 1
{
aload_0;
invokespecial Method java/lang/Object."<init>":"()V";
aload_0;
bipush 7;
putfield Field integer:"I";
return;
}
} // end Class reloc00104
//---------------------
======================================================================
Name: szC45993 Date: 01/15/99
The Tonga/src/nsk/relocator/reloc00104 test discovers the HotSpot VM (1.0beta1, core version, release build Jan 13 1999 12:43:10) error:
$ export CLASSPATH=".;c:\\zss\\classes_my;h:/ld32/sqe/harness_release/classes"
$ cd C:/zss/TONGA_WSs/testbase_js/src/nsk/relocator/reloc00104
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/javac.exe -d c:/zss/classes_my Status.java Test.java
$ rm Status.java Test.java
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/java.exe javasoft.sqe.jasm.Main -d c:/zss/classes_my DumpOutputStream.jasm
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/java.exe javasoft.sqe.jasm.Main -d c:/zss/classes_my reloc00104.jasm
#
# HotSpot Virtual Machine Error, Fatal Error
#
# Fatal: stack underflow
# C:\hotspot1_0beta1_hp-n-src-win\src\share\vm\oops\generateOopMap.cpp, 1981#
[1] + Done(134) c:/jdk1.2/bin/java -Xmixed -verify reloc00104
121 Abort c:/jdk1.2/bin/java
Before the test invokation, you should create .../reloc00104 dir.
Then to include in this dir all of below sources with the corresponding
names.
SOURCES:
//--------------------- Status.java:
package javasoft.sqe.harness;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.PrintStream;
public class Status
{
public static Status passed(String reason) {
return new Status(PASSED, reason);
}
public static Status failed(String reason) {
return new Status(FAILED, reason);
}
public static Status checkFile(String reason) {
return new Status(CHECK_FILE, reason);
}
public static Status notApplicable(String reason) {
return new Status(NOT_APPLICABLE, reason);
}
public static Status notRun(String reason) {
return new Status(NOT_RUN, reason);
}
public static final int PASSED = 0;
public static final int FAILED = 1;
public static final int CHECK_FILE = 2;
public static final int NOT_APPLICABLE = 3;
public static final int NOT_RUN = 4;
public int getType() {
return type;
}
public String getReason() {
return reason;
}
public Status augment(Status aux) {
if (aux.reason == null || aux.reason.length() == 0)
return this;
else
return new Status(type, (reason + " [" + aux.reason + "]"));
}
public void write(PrintStream out) {
out.println(toString());
}
public static Status read(DataInputStream in) throws IOException {
String s = in.readLine();
for (int i = 0; i < texts.length; i++)
if (s.startsWith(texts[i]))
return new Status(i, s.substring(texts[i].length()).trim());
return null;
}
public String toString() {
if (reason == null || reason.length() == 0)
return texts[type];
else
return texts[type] + " " + reason;
}
public void exit() {
PrintStream strm = System.err;
strm.print(marker);
write(strm);
strm.flush();
System.exit(exitCodes[type]);
}
public Status(int type, String reason) {
this.type = type;
this.reason = reason;
}
private int type;
private String reason;
private static final String marker = "STATUS:";
private static String[] texts = {
"Passed.",
"Failed.",
"Completed--check results.",
"Not applicable.",
"Not run."
};
public static final int[] exitCodes = { 95, 97, 96, 98, 99 };
}
//--------------------- Test.java:
package javasoft.sqe.harness;
import java.io.PrintStream;
public interface Test
{
public Status run(String[] args, PrintStream log, PrintStream ref);
}
//--------------------- DumpOutputStream.jasm:
super class DumpOutputStream
extends java/io/OutputStream
{
private Field radix:I;
private Field offset:I;
private Field nextprint:I;
private Field buf:"[B";
private Field pos:"Ljava/io/PrintStream;";
public Method "<init>":"(Ljava/io/OutputStream;)V"
stack 4 locals 2
{
aload_0;
invokespecial Method java/io/OutputStream."<init>":"()V";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
iconst_0;
putfield Field offset:"I";
aload_0;
iconst_0;
putfield Field nextprint:"I";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
bipush 16;
newarray byte;
putfield Field buf:"[B";
aload_0;
new class java/io/PrintStream;
dup;
aload_1;
invokespecial Method java/io/PrintStream."<init>":"(Ljava/io/OutputStream;)V";
putfield Field pos:"Ljava/io/PrintStream;";
return;
}
public Method "<init>":"(Ljava/io/OutputStream;I)V"
stack 4 locals 3
{
aload_0;
invokespecial Method java/io/OutputStream."<init>":"()V";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
iconst_0;
putfield Field offset:"I";
aload_0;
iconst_0;
putfield Field nextprint:"I";
aload_0;
iload_2;
putfield Field radix:"I";
aload_0;
bipush 16;
newarray byte;
putfield Field buf:"[B";
aload_0;
new class java/io/PrintStream;
dup;
aload_1;
invokespecial Method java/io/PrintStream."<init>":"(Ljava/io/OutputStream;)V";
putfield Field pos:"Ljava/io/PrintStream;";
return;
}
public Method flush:"()V"
throws java/io/IOException
stack 4 locals 4
{
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
aload_0;
aload_0;
getfield Field nextprint:"I";
invokespecial Method numToString:"(I)Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String ": ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
iconst_0;
istore_1;
goto L83;
L29: iload_1;
aload_0;
getfield Field offset:"I";
aload_0;
getfield Field nextprint:"I";
isub;
if_icmpge L71;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
aload_0;
aload_0;
getfield Field buf:"[B";
iload_1;
baload;
invokespecial Method numToString:"(B)Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
goto L80;
L71: aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
L80: iinc 1, 1;
L83: iload_1;
bipush 16;
if_icmplt L29;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " >";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
iconst_0;
istore_2;
goto L146;
L103: aload_0;
getfield Field buf:"[B";
iload_2;
baload;
i2c;
istore_3;
iload_3;
bipush 32;
if_icmplt L134;
iload_3;
bipush 127;
if_icmpge L134;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
iload_3;
invokevirtual Method java/io/PrintStream.print:"(C)V";
goto L143;
L134: aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String ".";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
L143: iinc 2, 1;
L146: iload_2;
aload_0;
getfield Field offset:"I";
aload_0;
getfield Field nextprint:"I";
isub;
if_icmplt L103;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String "<";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
aload_0;
aload_0;
getfield Field offset:"I";
putfield Field nextprint:"I";
return;
}
private Method numToString:"(B)Ljava/lang/String;"
stack 4 locals 2
{
aload_0;
iload_1;
sipush 255;
iand;
aload_0;
getfield Field radix:"I";
bipush 10;
if_icmpgt L19;
iconst_3;
goto L20;
L19: iconst_2;
L20: invokespecial Method numToString:"(II)Ljava/lang/String;";
areturn;
}
private Method numToString:"(I)Ljava/lang/String;"
stack 3 locals 2
{
aload_0;
iload_1;
bipush 8;
invokespecial Method numToString:"(II)Ljava/lang/String;";
areturn;
}
private Method numToString:"(II)Ljava/lang/String;"
stack 4 locals 4
{
iload_1;
aload_0;
getfield Field radix:"I";
invokestatic Method java/lang/Integer.toString:"(II)Ljava/lang/String;";
astore_3;
goto L46;
L12: new class java/lang/StringBuffer;
dup;
aload_0;
getfield Field radix:"I";
bipush 10;
if_icmpne L30;
ldc String " ";
goto L32;
L30: ldc String "0";
L32: invokestatic Method java/lang/String.valueOf:"(Ljava/lang/Object;)Ljava/lang/String;";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_3;
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
astore_3;
L46: aload_3;
invokevirtual Method java/lang/String.length:"()I";
iload_2;
if_icmplt L12;
aload_3;
areturn;
}
public Method write:"(I)V"
throws java/io/IOException
stack 5 locals 2
{
aload_0;
getfield Field buf:"[B";
aload_0;
dup;
getfield Field offset:"I";
dup_x1;
iconst_1;
iadd;
putfield Field offset:"I";
bipush 15;
iand;
iload_1;
i2b;
bastore;
aload_0;
getfield Field offset:"I";
bipush 15;
iand;
ifne L35;
aload_0;
invokevirtual Method flush:"()V";
L35: return;
}
} // end Class DumpOutputStream
//--------------------- reloc00104.jasm:
super public class reloc00104
{
private transient Field out:"Ljava/io/PrintStream;";
private transient Field log:"Ljava/io/PrintStream;";
Field istream:"Ljava/io/ByteArrayInputStream;";
Field p:"Ljava/io/ObjectOutputStream;";
Field q:"Ljava/io/ObjectInputStream;";
Field rest:"LDumpOutputStream;";
Field dump:"LDumpOutputStream;";
Field ch:I;
Field integer:I;
public Method run:"()I"
// stack 4 locals 7
stack 5 locals 3
{
aload_0;
aconst_null;
putfield Field istream:"Ljava/io/ByteArrayInputStream;";
try t187;
new class java/io/ByteArrayOutputStream;
dup;
sipush 2048;
invokespecial Method java/io/ByteArrayOutputStream."<init>":"(I)V";
astore_1;
new class java/io/ObjectOutputStream;
dup;
aload_1;
invokespecial Method java/io/ObjectOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
iconst_4;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
bipush 8;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
iconst_4;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
bipush 12;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
invokevirtual Method java/io/ObjectOutputStream.flush:"()V";
new class DumpOutputStream;
dup;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokespecial Method DumpOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field dump:"LDumpOutputStream;";
aload_1;
aload_0;
getfield Field dump:"LDumpOutputStream;";
invokevirtual Method java/io/ByteArrayOutputStream.writeTo:"(Ljava/io/OutputStream;)V";
aload_0;
new class java/io/ByteArrayInputStream;
dup;
aload_1;
invokevirtual Method java/io/ByteArrayOutputStream.toByteArray:"()[B";
invokespecial Method java/io/ByteArrayInputStream."<init>":"([B)V";
putfield Field istream:"Ljava/io/ByteArrayInputStream;";
new class java/io/ObjectInputStream;
dup;
aload_0;
getfield Field istream:"Ljava/io/ByteArrayInputStream;";
invokespecial Method java/io/ObjectInputStream."<init>":"(Ljava/io/InputStream;)V";
aload_0;
swap;
putfield Field q:"Ljava/io/ObjectInputStream;";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
iconst_4;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
bipush 8;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
iconst_4;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
bipush 12;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
try t173;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method java/io/ObjectInputStream.read:"()I";
istore 2;
endtry t173;
goto L174;
catch t173 java/io/EOFException;
pop;
try t183;
L174: aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
endtry t183;
goto L266;
catch t183 java/io/EOFException;
pop;
goto L266;
endtry t187;
catch t187 java/lang/Exception;
astore_1;
aload_1;
invokevirtual Method java/lang/Throwable.printStackTrace:"()V";
new class DumpOutputStream;
dup;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokespecial Method DumpOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field rest:"LDumpOutputStream;";
try t234, t244;
goto L218;
L210: aload_0;
getfield Field rest:"LDumpOutputStream;";
aload_0;
getfield Field ch:"I";
invokevirtual Method DumpOutputStream.write:"(I)V";
L218: aload_0;
getfield Field istream:"Ljava/io/ByteArrayInputStream;";
invokevirtual Method java/io/ByteArrayInputStream.read:"()I";
dup;
aload_0;
swap;
putfield Field ch:"I";
iconst_m1;
if_icmpne L210;
endtry t234;
goto L238;
catch t234 java/lang/Exception;
pop;
goto L238;
endtry t244;
L238: jsr L252;
goto L264;
catch t244 #0;
astore 2;
jsr L252;
aload 2;
athrow;
L252: astore 1;
try t261;
aload_0;
getfield Field rest:"LDumpOutputStream;";
invokevirtual Method DumpOutputStream.flush:"()V";
endtry t261;
goto L262;
catch t261 java/io/IOException;
pop;
L262: ret 1;
L264: iconst_2;
ireturn;
L266: iconst_0;
m1: bipush 2;
tableswitch
1 : m3;
2 : m4;
9 : m3;
default: m3
};
m3: iconst_2;
ireturn;
m4: iconst_0;
ireturn;
ireturn;
}
Method expectObject:"(Ljava/io/ObjectInputStream;)V"
stack 4 locals 3
{
try t6, t54;
aload_1;
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
endtry t6, t54;
return;
catch t6 java/io/OptionalDataException;
astore_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
new class java/lang/StringBuffer;
dup;
ldc String "Unexpected OptionalDataException, length = ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_2;
getfield Field java/io/OptionalDataException.length:"I";
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
ldc String ", eof = ";
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
aload_2;
getfield Field java/io/OptionalDataException.eof:"Z";
invokevirtual Method java/lang/StringBuffer.append:"(Z)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
aload_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokevirtual Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V";
return;
catch t54 java/lang/Exception;
astore_2;
aload_2;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokevirtual Method java/lang/Throwable.printStackTrace:"(Ljava/io/PrintStream;)V";
return;
}
Method expectData:"(Ljava/io/ObjectInputStream;I)V"
throws java/io/IOException, java/lang/ClassNotFoundException
stack 4 locals 5
{
try t15;
aload_1;
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
ldc String "Incorrect value, expected data, found an object.";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
endtry t15;
return;
catch t15 java/io/OptionalDataException;
pop;
iload_2;
iconst_1;
isub;
istore_3;
goto L71;
L23: aload_1;
invokevirtual Method java/io/ObjectInputStream.readByte:"()B";
istore 4;
iload 4;
iload_3;
if_icmpeq L68;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
new class java/lang/StringBuffer;
dup;
ldc String "Incorrect byte, expected ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
iload_3;
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
ldc String " found ";
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
iload 4;
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
L68: iinc 3, -1;
L71: iload_3;
ifge L23;
return;
}
Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V"
throws java/io/IOException
stack 2 locals 4
{
iload_2;
iconst_1;
isub;
istore_3;
goto L15;
L7: aload_1;
iload_3;
invokevirtual Method java/io/ObjectOutputStream.writeByte:"(I)V";
iinc 3, -1;
L15: iload_3;
ifge L7;
return;
}
public Method equals:"(Ljava/lang/Object;)Z"
stack 1 locals 2
{
aload_1;
ifnull L11;
aload_1;
instanceof class PrimitivesTest;
ifne L13;
L11: iconst_0;
ireturn;
L13: aload_1;
checkcast class PrimitivesTest;
pop;
iconst_1;
ireturn;
}
public Method toString:"()Ljava/lang/String;"
stack 3 locals 1
{
new class java/lang/StringBuffer;
dup;
ldc String "integer = ";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_0;
getfield Field integer:"I";
invokevirtual Method java/lang/StringBuffer.append:"(I)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
areturn;
}
public static Method main:"([Ljava/lang/String;)V"
stack 2 locals 1
{
new class reloc00104;
dup;
invokespecial Method "<init>":"()V";
invokevirtual Method run:"()I";
pop;
return;
}
public Method "<init>":"()V"
stack 2 locals 1
{
aload_0;
invokespecial Method java/lang/Object."<init>":"()V";
aload_0;
bipush 7;
putfield Field integer:"I";
return;
}
} // end Class reloc00104
//---------------------
======================================================================
Name: szC45993 Date: 01/15/99
The Tonga/src/nsk/relocator/reloc00104 test discovers the HotSpot VM (1.0beta1, core version, release build Jan 13 1999 12:43:10) error:
$ export CLASSPATH=".;c:\\zss\\classes_my;h:/ld32/sqe/harness_release/classes"
$ cd C:/zss/TONGA_WSs/testbase_js/src/nsk/relocator/reloc00104
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/javac.exe -d c:/zss/classes_my Status.java Test.java
$ rm Status.java Test.java
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/java.exe javasoft.sqe.jasm.Main -d c:/zss/classes_my DumpOutputStream.jasm
$ h:/ld25/java/dest/jdk1.1.6/win32/bin/java.exe javasoft.sqe.jasm.Main -d c:/zss/classes_my reloc00104.jasm
#
# HotSpot Virtual Machine Error, Fatal Error
#
# Fatal: stack underflow
# C:\hotspot1_0beta1_hp-n-src-win\src\share\vm\oops\generateOopMap.cpp, 1981#
[1] + Done(134) c:/jdk1.2/bin/java -Xmixed -verify reloc00104
121 Abort c:/jdk1.2/bin/java
Before the test invokation, you should create .../reloc00104 dir.
Then to include in this dir all of below sources with the corresponding
names.
SOURCES:
//--------------------- Status.java:
package javasoft.sqe.harness;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.PrintStream;
public class Status
{
public static Status passed(String reason) {
return new Status(PASSED, reason);
}
public static Status failed(String reason) {
return new Status(FAILED, reason);
}
public static Status checkFile(String reason) {
return new Status(CHECK_FILE, reason);
}
public static Status notApplicable(String reason) {
return new Status(NOT_APPLICABLE, reason);
}
public static Status notRun(String reason) {
return new Status(NOT_RUN, reason);
}
public static final int PASSED = 0;
public static final int FAILED = 1;
public static final int CHECK_FILE = 2;
public static final int NOT_APPLICABLE = 3;
public static final int NOT_RUN = 4;
public int getType() {
return type;
}
public String getReason() {
return reason;
}
public Status augment(Status aux) {
if (aux.reason == null || aux.reason.length() == 0)
return this;
else
return new Status(type, (reason + " [" + aux.reason + "]"));
}
public void write(PrintStream out) {
out.println(toString());
}
public static Status read(DataInputStream in) throws IOException {
String s = in.readLine();
for (int i = 0; i < texts.length; i++)
if (s.startsWith(texts[i]))
return new Status(i, s.substring(texts[i].length()).trim());
return null;
}
public String toString() {
if (reason == null || reason.length() == 0)
return texts[type];
else
return texts[type] + " " + reason;
}
public void exit() {
PrintStream strm = System.err;
strm.print(marker);
write(strm);
strm.flush();
System.exit(exitCodes[type]);
}
public Status(int type, String reason) {
this.type = type;
this.reason = reason;
}
private int type;
private String reason;
private static final String marker = "STATUS:";
private static String[] texts = {
"Passed.",
"Failed.",
"Completed--check results.",
"Not applicable.",
"Not run."
};
public static final int[] exitCodes = { 95, 97, 96, 98, 99 };
}
//--------------------- Test.java:
package javasoft.sqe.harness;
import java.io.PrintStream;
public interface Test
{
public Status run(String[] args, PrintStream log, PrintStream ref);
}
//--------------------- DumpOutputStream.jasm:
super class DumpOutputStream
extends java/io/OutputStream
{
private Field radix:I;
private Field offset:I;
private Field nextprint:I;
private Field buf:"[B";
private Field pos:"Ljava/io/PrintStream;";
public Method "<init>":"(Ljava/io/OutputStream;)V"
stack 4 locals 2
{
aload_0;
invokespecial Method java/io/OutputStream."<init>":"()V";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
iconst_0;
putfield Field offset:"I";
aload_0;
iconst_0;
putfield Field nextprint:"I";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
bipush 16;
newarray byte;
putfield Field buf:"[B";
aload_0;
new class java/io/PrintStream;
dup;
aload_1;
invokespecial Method java/io/PrintStream."<init>":"(Ljava/io/OutputStream;)V";
putfield Field pos:"Ljava/io/PrintStream;";
return;
}
public Method "<init>":"(Ljava/io/OutputStream;I)V"
stack 4 locals 3
{
aload_0;
invokespecial Method java/io/OutputStream."<init>":"()V";
aload_0;
bipush 16;
putfield Field radix:"I";
aload_0;
iconst_0;
putfield Field offset:"I";
aload_0;
iconst_0;
putfield Field nextprint:"I";
aload_0;
iload_2;
putfield Field radix:"I";
aload_0;
bipush 16;
newarray byte;
putfield Field buf:"[B";
aload_0;
new class java/io/PrintStream;
dup;
aload_1;
invokespecial Method java/io/PrintStream."<init>":"(Ljava/io/OutputStream;)V";
putfield Field pos:"Ljava/io/PrintStream;";
return;
}
public Method flush:"()V"
throws java/io/IOException
stack 4 locals 4
{
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
aload_0;
aload_0;
getfield Field nextprint:"I";
invokespecial Method numToString:"(I)Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String ": ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
iconst_0;
istore_1;
goto L83;
L29: iload_1;
aload_0;
getfield Field offset:"I";
aload_0;
getfield Field nextprint:"I";
isub;
if_icmpge L71;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
aload_0;
aload_0;
getfield Field buf:"[B";
iload_1;
baload;
invokespecial Method numToString:"(B)Ljava/lang/String;";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
goto L80;
L71: aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " ";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
L80: iinc 1, 1;
L83: iload_1;
bipush 16;
if_icmplt L29;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String " >";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
iconst_0;
istore_2;
goto L146;
L103: aload_0;
getfield Field buf:"[B";
iload_2;
baload;
i2c;
istore_3;
iload_3;
bipush 32;
if_icmplt L134;
iload_3;
bipush 127;
if_icmpge L134;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
iload_3;
invokevirtual Method java/io/PrintStream.print:"(C)V";
goto L143;
L134: aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String ".";
invokevirtual Method java/io/PrintStream.print:"(Ljava/lang/String;)V";
L143: iinc 2, 1;
L146: iload_2;
aload_0;
getfield Field offset:"I";
aload_0;
getfield Field nextprint:"I";
isub;
if_icmplt L103;
aload_0;
getfield Field pos:"Ljava/io/PrintStream;";
ldc String "<";
invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
aload_0;
aload_0;
getfield Field offset:"I";
putfield Field nextprint:"I";
return;
}
private Method numToString:"(B)Ljava/lang/String;"
stack 4 locals 2
{
aload_0;
iload_1;
sipush 255;
iand;
aload_0;
getfield Field radix:"I";
bipush 10;
if_icmpgt L19;
iconst_3;
goto L20;
L19: iconst_2;
L20: invokespecial Method numToString:"(II)Ljava/lang/String;";
areturn;
}
private Method numToString:"(I)Ljava/lang/String;"
stack 3 locals 2
{
aload_0;
iload_1;
bipush 8;
invokespecial Method numToString:"(II)Ljava/lang/String;";
areturn;
}
private Method numToString:"(II)Ljava/lang/String;"
stack 4 locals 4
{
iload_1;
aload_0;
getfield Field radix:"I";
invokestatic Method java/lang/Integer.toString:"(II)Ljava/lang/String;";
astore_3;
goto L46;
L12: new class java/lang/StringBuffer;
dup;
aload_0;
getfield Field radix:"I";
bipush 10;
if_icmpne L30;
ldc String " ";
goto L32;
L30: ldc String "0";
L32: invokestatic Method java/lang/String.valueOf:"(Ljava/lang/Object;)Ljava/lang/String;";
invokespecial Method java/lang/StringBuffer."<init>":"(Ljava/lang/String;)V";
aload_3;
invokevirtual Method java/lang/StringBuffer.append:"(Ljava/lang/String;)Ljava/lang/StringBuffer;";
invokevirtual Method java/lang/StringBuffer.toString:"()Ljava/lang/String;";
astore_3;
L46: aload_3;
invokevirtual Method java/lang/String.length:"()I";
iload_2;
if_icmplt L12;
aload_3;
areturn;
}
public Method write:"(I)V"
throws java/io/IOException
stack 5 locals 2
{
aload_0;
getfield Field buf:"[B";
aload_0;
dup;
getfield Field offset:"I";
dup_x1;
iconst_1;
iadd;
putfield Field offset:"I";
bipush 15;
iand;
iload_1;
i2b;
bastore;
aload_0;
getfield Field offset:"I";
bipush 15;
iand;
ifne L35;
aload_0;
invokevirtual Method flush:"()V";
L35: return;
}
} // end Class DumpOutputStream
//--------------------- reloc00104.jasm:
super public class reloc00104
{
private transient Field out:"Ljava/io/PrintStream;";
private transient Field log:"Ljava/io/PrintStream;";
Field istream:"Ljava/io/ByteArrayInputStream;";
Field p:"Ljava/io/ObjectOutputStream;";
Field q:"Ljava/io/ObjectInputStream;";
Field rest:"LDumpOutputStream;";
Field dump:"LDumpOutputStream;";
Field ch:I;
Field integer:I;
public Method run:"()I"
// stack 4 locals 7
stack 5 locals 3
{
aload_0;
aconst_null;
putfield Field istream:"Ljava/io/ByteArrayInputStream;";
try t187;
new class java/io/ByteArrayOutputStream;
dup;
sipush 2048;
invokespecial Method java/io/ByteArrayOutputStream."<init>":"(I)V";
astore_1;
new class java/io/ObjectOutputStream;
dup;
aload_1;
invokespecial Method java/io/ObjectOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
iconst_4;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
bipush 8;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
iconst_4;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
bipush 12;
invokevirtual Method writeSeq:"(Ljava/io/ObjectOutputStream;I)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
aload_0;
invokevirtual Method java/io/ObjectOutputStream.writeObject:"(Ljava/lang/Object;)V";
aload_0;
getfield Field p:"Ljava/io/ObjectOutputStream;";
invokevirtual Method java/io/ObjectOutputStream.flush:"()V";
new class DumpOutputStream;
dup;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokespecial Method DumpOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field dump:"LDumpOutputStream;";
aload_1;
aload_0;
getfield Field dump:"LDumpOutputStream;";
invokevirtual Method java/io/ByteArrayOutputStream.writeTo:"(Ljava/io/OutputStream;)V";
aload_0;
new class java/io/ByteArrayInputStream;
dup;
aload_1;
invokevirtual Method java/io/ByteArrayOutputStream.toByteArray:"()[B";
invokespecial Method java/io/ByteArrayInputStream."<init>":"([B)V";
putfield Field istream:"Ljava/io/ByteArrayInputStream;";
new class java/io/ObjectInputStream;
dup;
aload_0;
getfield Field istream:"Ljava/io/ByteArrayInputStream;";
invokespecial Method java/io/ObjectInputStream."<init>":"(Ljava/io/InputStream;)V";
aload_0;
swap;
putfield Field q:"Ljava/io/ObjectInputStream;";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
iconst_4;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
bipush 8;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
iconst_4;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
bipush 12;
invokevirtual Method expectData:"(Ljava/io/ObjectInputStream;I)V";
aload_0;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method expectObject:"(Ljava/io/ObjectInputStream;)V";
try t173;
aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method java/io/ObjectInputStream.read:"()I";
istore 2;
endtry t173;
goto L174;
catch t173 java/io/EOFException;
pop;
try t183;
L174: aload_0;
getfield Field q:"Ljava/io/ObjectInputStream;";
invokevirtual Method java/io/ObjectInputStream.readObject:"()Ljava/lang/Object;";
pop;
endtry t183;
goto L266;
catch t183 java/io/EOFException;
pop;
goto L266;
endtry t187;
catch t187 java/lang/Exception;
astore_1;
aload_1;
invokevirtual Method java/lang/Throwable.printStackTrace:"()V";
new class DumpOutputStream;
dup;
aload_0;
getfield Field out:"Ljava/io/PrintStream;";
invokespecial Method DumpOutputStream."<init>":"(Ljava/io/OutputStream;)V";
aload_0;
swap;
putfield Field rest:"LDumpOutputStream;";
try t234, t244;
goto L218;
L210: aload_0;
getfield Field rest:"LDumpOutputStream;";
aload_0;
getfield Field ch:"I";
invokevirtual Method DumpOutputStream.write:"(I)V";
L218: aload_0;
getfield Field istream:"Ljava/io/ByteArrayInputStream;";
invokevirtual Method java/io/ByteArrayInputStream.read:"()I";
dup;
aload_0;
swap;
putfield Field ch:"I";
iconst_m1;
if_icmpne L210;
endtry t234;
goto L238;
catch t234 java/lang/Exception;
pop;
goto L238;
endtry t244;
L238: jsr L252;
goto L264;
catch t244 #0;
astore 2;
jsr L252;
aload 2;
athrow;
L252: astore 1;
try t261;
aload_0;
getfield Field rest:"LDumpOutputStream;";
invokevirtual Method DumpOutputStream.flush:"()V";
endtry t261;
goto L262;
catch t261 java/io/IOException;
pop;
L262: ret 1;
L264: iconst_2;
ireturn;
L266: iconst_0;
m1: bipush 2;
tableswitch