RFR: 8364360: Defining hidden class with no room in constant pool crashes the VM [v5]
Coleen Phillimore
coleenp at openjdk.org
Fri Oct 31 18:13:08 UTC 2025
On Tue, 28 Oct 2025 13:06:50 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> ClassWriter.newUTF8() returns the index in the constant pool so you can use that information
>>
>>
>> int maxCPIndex = cw.newUTF8(Integer.toString(-1));
>> int maxEntry = 65535 - maxCPIndex - 1;
>
> I think I figured it out. It's sort of um interesting.
Oh thank you! that's very helpful.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27964#discussion_r2482296425
More information about the hotspot-runtime-dev
mailing list