JDK-4453115 : GetBytecodes returns quicked invoke instructions
  • Type: Bug
  • Component: hotspot
  • Sub-Component: jvmti
  • Affected Version: 1.4.0,1.4.2,5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris_7
  • CPU: generic,sparc
  • Submitted: 2001-05-02
  • Updated: 2004-02-26
  • Resolved: 2004-02-26
Related Reports
Duplicate :  
Duplicate :  
Description
The JVMDI function GetBytecodes returns the quicked invoke 
instructions 214 and 215.  Only standard bytecodes should 
be returned.

Output of JDI based test program on the loaded classes of a HelloWorld
program:

% java QuickedTest
run args: [QuickedTarg]
JVM version:1.4.0-internal
JDI version: 1.4
JVM description: Java Debug Interface (Reference Implementation) version 1.4 
Java Debug Wire Protocol (Reference Implementation) version 1.4
JVM Debug Interface version 1.1
JVM version 1.4.0-internal (Java HotSpot(TM) Client VM, interpreted mode)
Non-standard opcode - java.io.DataInputStream.readLine@41: opcode=214
Non-standard opcode - java.io.FilePermission.getMask@603: opcode=215
Non-standard opcode - java.lang.Character.toLowerCase@52: opcode=215
Non-standard opcode - java.lang.Character.toUpperCase@52: opcode=215
Non-standard opcode - java.lang.Character.getNumericValue@40: opcode=214
Non-standard opcode - java.lang.Character.toUpperCaseEx@67: opcode=214
Non-standard opcode - java.nio.Bits.byteOrder@39: opcode=214
Non-standard opcode - java.util.Properties.saveConvert@33: opcode=215
Non-standard opcode - java.util.zip.ZipFile.getInputStream@58: opcode=214
Non-standard opcode - sun.misc.ExtensionDependency.checkExtensionAgainst@188: opcode=214
Non-standard opcode - sun.net.www.MessageHeader.mergeHeader@51: opcode=215
Howdy!
Exception in thread "main" java.lang.Exception: QuickedTest: failed
	

Name: pvR10198			Date: 05/27/2002


This bug also affects the following test from testbase_nsk:

    nsk/jvmdi/GetBytecodes/bytecodes003

The test will be available in the next release v141r15.

Pavel Vysotski <###@###.###>
======================================================================

Name: ipR10196			Date: 08/26/2003


Similar bug is revealed for the corresponding JVMTI function
GetBytecodes(). The tests affected are:

  nsk/jvmti/GetBytecodes/bytecodes003

Ivan Popov <###@###.###>

======================================================================

Comments
PUBLIC COMMENTS The JVMDI function GetBytecodes returns the quicked invoke instructions 214 and 215. Only standard bytecodes should be returned. Output of JDI based test program on the loaded classes of a HelloWorld program: % java QuickedTest run args: [QuickedTarg] JVM version:1.4.0-internal JDI version: 1.4 JVM description: Java Debug Interface (Reference Implementation) version 1.4 Java Debug Wire Protocol (Reference Implementation) version 1.4 JVM Debug Interface version 1.1 JVM version 1.4.0-internal (Java HotSpot(TM) Client VM, interpreted mode) Non-standard opcode - java.io.DataInputStream.readLine@41: opcode=214 Non-standard opcode - java.io.FilePermission.getMask@603: opcode=215 Non-standard opcode - java.lang.Character.toLowerCase@52: opcode=215 Non-standard opcode - java.lang.Character.toUpperCase@52: opcode=215 Non-standard opcode - java.lang.Character.getNumericValue@40: opcode=214 Non-standard opcode - java.lang.Character.toUpperCaseEx@67: opcode=214 Non-standard opcode - java.nio.Bits.byteOrder@39: opcode=214 Non-standard opcode - java.util.Properties.saveConvert@33: opcode=215 Non-standard opcode - java.util.zip.ZipFile.getInputStream@58: opcode=214 Non-standard opcode - sun.misc.ExtensionDependency.checkExtensionAgainst@188: opcode=214 Non-standard opcode - sun.net.www.MessageHeader.mergeHeader@51: opcode=215 Howdy! Exception in thread "main" java.lang.Exception: QuickedTest: failed
10-06-2004

EVALUATION See description. QuickedTest.java and RuntimeConstants.java attached and in regressionTestsInWaiting. robert.field@Eng 2001-05-01 The non-java bytecodes except _fast_binaryswitch and _fast_linearswitch and _breakpoint have been removed (or will be by the time you read this). I don't know how to run this test or if there's anything that needs to be done for these three bytecodes, so I'm reassigning it to Jim. Thanks. ###@###.### 2001-12-24 --- As of tiger-b40 GetBytesocdes no longer returns fast bytecodes or the breakpoint bytecode to the agent. Instead the original/java bytecodes are returned - see 4990749. However with this fix the bytecodes003 test is still failing - here's the output :- ##Exit status of execution step=97 ##!checkExitCode #Non-standard opcode: 243 (0xf3) # class: "Lsun/net/www/MessageHeader;" # method = "findValue(Ljava/lang/String;)Ljava/lang/String;" #Non-standard opcode: 241 (0xf1) # class: "Lsun/net/www/MessageHeader;" # method = "findNextValue(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" This remaining failure appears to be a test bug - I've checked the returned byte array for these methods and they do not contain 0xf3 or 0xf1. I will investigate the test further and re-assign to hotspot/test. ###@###.### 2004-02-17 This does appear to be a test bug - although 0xf3 and 0xf1 aren't reported as bytecode they are used for branch bytes in the ifnonnull instruction - for example sun.net.www.MessageHeader.findValue(java.lang.String) is :- : 21: aaload // 0x32 22: ifnonnull 9 // 0xc7 0xff 0xf3 25: aload_0 // 0x2a So it looks like the test is treating ifnonnull as 2-byte instruction and therefore treats the second byte to the branch as a bytecode. ###@###.### 2004-02-17 4990749 fixed the implementation so that the original bytecodes are returned, and 4995520 is tracking the test bug whereby ifnull was considered a 2 byte instruction. Therefore there's no point keeping this bug open and I will close it as a dup of 4990749. ###@###.### 2004-02-26
26-02-2004