[lworld] RFR: 8293134: Valhalla: Verifier error in method call with abstract value class arg [v2]

Harold Seigel hseigel at openjdk.org
Fri Sep 9 19:48:05 UTC 2022


On Fri, 9 Sep 2022 13:18:03 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Harold Seigel has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   fix prmitive class check
>
> src/hotspot/share/classfile/verificationType.cpp line 67:
> 
>> 65:   }
>> 66: 
>> 67:   if (this_class->access_flags().is_value_class()) return false;
> 
> This line looks wrong to me. If the method is called with name and from_name being identical, and the corresponding class being a primitive class, the method returns false.
> This particular scenario is handled in the caller when this method is invoked from VerificationType::is_reference_assignable_from(), but is not handled when called from SystemDictionaryShared::check_verification_constraints().
> This problem is not due to the proposed change, the previous code testing for a value class suffers from the same issue.

I agree.  See changes to this code in commit 2.   Thanks for looking at this PR.

-------------

PR: https://git.openjdk.org/valhalla/pull/750



More information about the valhalla-dev mailing list