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

Harold David Seigel harold.seigel at oracle.com
Fri Jun 1 12:07:52 UTC 2018


Thanks Karen!

Harold

On 5/31/2018 5:35 PM, Karen Kinnear wrote:
> Harold,
>
> Many thanks. The changes look great.
>
> I was wrong about expecting changes to putstatic.
>  From JVMS 2.4 *http://cr.openjdk.java.net/~fparain/L-world/L-World-JVMS-4d.pdf)
> A value class type defines a class for which all instances are identity-less and immutable.
> The class itself is not immutable.
>
> thank you very much,
> Karen
>
>> On May 31, 2018, at 10:30 AM, Harold David Seigel <harold.seigel at oracle.com> wrote:
>>
>> 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