changeset 6590:64054ee415d5

8024027: Test sun/misc/IoTrace/IoTraceSocketReadWrite.java crashes VM Reviewed-by: alanb
author sla
date Mon, 23 Sep 2013 19:33:10 -0700
parents 3320bcbd2eaa
children d27628b9992e
files test/sun/misc/IoTrace/IoTraceAgent.java test/sun/misc/IoTrace/ioTraceTest.sh
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/misc/IoTrace/IoTraceAgent.java	Mon Sep 23 16:48:03 2013 +0100
+++ b/test/sun/misc/IoTrace/IoTraceAgent.java	Mon Sep 23 19:33:10 2013 -0700
@@ -27,6 +27,7 @@
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_STATIC;
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ACC_SUPER;
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ILOAD;
+import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.ALOAD;
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESPECIAL;
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.INVOKESTATIC;
 import static com.sun.xml.internal.ws.org.objectweb.asm.Opcodes.IRETURN;
@@ -165,6 +166,7 @@
 
             // return the value from the called method
             mv.visitInsn(retType.getOpcode(IRETURN));
+            mv.visitMaxs(0, 0);
             mv.visitEnd();
         }
 
@@ -172,8 +174,10 @@
         MethodVisitor mv = cw.visitMethod(ACC_PRIVATE, "<init>", "()V", null,
                 null);
         mv.visitCode();
+        mv.visitVarInsn(ALOAD, 0);
         mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V");
         mv.visitInsn(RETURN);
+        mv.visitMaxs(0, 0);
         mv.visitEnd();
 
         cw.visitEnd();
--- a/test/sun/misc/IoTrace/ioTraceTest.sh	Mon Sep 23 16:48:03 2013 +0100
+++ b/test/sun/misc/IoTrace/ioTraceTest.sh	Mon Sep 23 19:33:10 2013 -0700
@@ -31,4 +31,4 @@
 ${TESTJAVA}/bin/jar cfm iotraceagent.jar ${TESTSRC}/iotraceagent.mf IoTraceAgent.class IoTraceListener.class
 
 cd ${PWD}
-${TESTJAVA}/bin/java ${TESTVMOPTS} -javaagent:${TESTCLASSES}/iotraceagent.jar -cp ${TESTCLASSES} $*
+${TESTJAVA}/bin/java -Xverify:all ${TESTVMOPTS} -javaagent:${TESTCLASSES}/iotraceagent.jar -cp ${TESTCLASSES} $*