RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v7]
Adam Sotona
asotona at openjdk.org
Fri May 17 13:07:32 UTC 2024
On Fri, 17 May 2024 08:28:51 GMT, Adam Sotona <asotona at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java line 308:
>>
>>> 306: 0;
>>> 307: default ->
>>> 308: -1;
>>
>> I recommend we explicitly return -1 to skip verification only for UnknownAttribute and CustomAttribute; then our tests can catch missing verification for new attribute additions.
>
> There are still many attributes missing here (yet). However it is a nice goal.
OK, I've added the missing attributes to the verification.
Now it will throw an AssertionError if we forget to verify newly added attribute.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16809#discussion_r1604971946
More information about the compiler-dev
mailing list