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

Frederic Parain fparain at openjdk.org
Fri Sep 9 13:21:57 UTC 2022


On Thu, 8 Sep 2022 17:13:08 GMT, Harold Seigel <hseigel at openjdk.org> wrote:

> Please review this small fix for JDK-8293134.  Since a value class can be abstract and a super class, only return false at line 64 for primitive classes.
> 
> The fix is tested by running mach5 tiers 1-2 on Linux, Mac OS, and Windows, and mach5 tiers 3-5 on Linux x64.  (testing is in progress.)
> 
> Thanks, Harold

Changes requested by fparain (Committer).

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 it 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.

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

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



More information about the valhalla-dev mailing list