RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v5]
Adam Sotona
asotona at openjdk.org
Tue May 14 08:25:05 UTC 2024
On Mon, 13 May 2024 17:35:39 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Is this method only supposed to check the attribute size? It would be nice perhaps to enhance this to enforce more structural constraints - I added a couple of comments in that direction, but there's many more (e.g. for instance make sure that any entry that morally points to a class/method is of the right kind)
>
> Some of the checks don't verify the attributes point to valid cp entries; since CF API is lazy, those entries much be expanded by calling the accessors on Bound attributes.
Good point.
Constant pool consistency verification is already covered, however pointing to the right entries is not.
Touching all the attribute values will do the job.
Thanks!
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16809#discussion_r1599592698
More information about the compiler-dev
mailing list