On Tue, 18 Nov 2025 18:50:55 GMT, Coleen Phillimore <[email protected]> wrote:
>> src/hotspot/share/classfile/classFileParser.cpp line 815:
>>
>>> 813: interface_index, CHECK);
>>> 814: if (cp->tag_at(interface_index).is_klass()) {
>>> 815: interf =
>>> InstanceKlass::cast(cp->resolved_klass_at(interface_index));
>>
>> Note that a resolved `CONSTANT_Class` can refer to an array type, so this
>> cast is incorrect.
>
> There are a bunch of tests that we don't have. This would be an error since
> Interfaces are never arrays, but that's checked later. I'll revert some of
> these casts (as well as try to write a test for this).
I thought the cast at line 839 would have handled this. Turns out it has a
`!interf->is_interface()` check before so this cast is problematic.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28371#discussion_r2539538759