[lworld] RFR: 8326597: [lworld] Verifier must enforce new JEP 401 rules related to strict fields

David Holmes dholmes at openjdk.org
Fri Jun 14 02:57:46 UTC 2024


On Thu, 30 May 2024 13:27:21 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> There are a number of commits here relating to different changes. To keep things more simple you can look at them individually.
>> 
>> Changes:
>> - removed the old Q-type support from the verifier (verifierType.hpp/cpp)
>> - added the necessary checks for strict fields to the verifier and added some tests
>> - added missing class modifier checks for value classes in the classfile parse
>> - brought the field modifier checks in classfile parser into line with JEP 401, simplified logic and provided more informative exception messages.
>> - updated existing tests to  support the above
>> 
>> There is still a lot of inline-type terminology remaining, at least some of which should be cleaned up in future RFE's
>
> src/hotspot/share/classfile/verifier.cpp line 2403:
> 
>> 2401:           stack_object_type = current_type();
>> 2402:         }
>> 2403:       } else if (supports_value_types(_klass)) {
> 
> The mention of value types here could be confusing.
> What about changing `supports_value_types()` to `supports_strict_fields()`?

I was copying/emulating the use of `ClassFileParser::supports_inline_types` but changing `inline` to `value`. I can change to `supports_strict_fields` for this new code, but the Classfile parser uses `inline types` to cover both cases (not that I expect to have one without the other).

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1109#discussion_r1621737967



More information about the valhalla-dev mailing list