RFR: add verifier checks for when a reference can and cannot be a value type

Harold David Seigel harold.seigel at oracle.com
Thu May 31 14:30:12 UTC 2018


Hi,

Please review this change to add checks to the verifier for the following:

 1. Not allow the operand for a NEW or MONITOR* opcode be a value type.
 2. Require that the reference operand for a WITHFIELD or DEFAULTVALUE
    opcode be a value type.
 3. Not allow the field for a PUTFIELD opcode to be in a value type
    unless the current method is named "<init>".

Also, some of the existing test cases in verfierTests.jcod were modified 
to add the ValueTypes attribute.

Webrev: 
http://cr.openjdk.java.net/~hseigel/vt_verifier_checks/webrev/index.html

The fix was tested with JCK Lang and VM tests, Hotspot JTReg tests, and 
with many JDK JTReg tests.

Thanks, Harold



More information about the valhalla-dev mailing list