RFR: 8364360: Defining hidden class with no room in constant pool crashes the VM [v2]
David Holmes
dholmes at openjdk.org
Tue Oct 28 03:53:04 UTC 2025
On Mon, 27 Oct 2025 12:45:11 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> Check for constant pool index overflow and throw ClassFormatError instead of crashing.
>> Tested with tier1-4.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Test enhancement and comment.
test/hotspot/jtreg/runtime/ClassFile/HiddenClassesTest.java line 53:
> 51: } catch (ClassFormatError cfe) {
> 52: String message = cfe.getMessage();
> 53: if (message == null && message.contains("Overflow in constant pool size for hidden class")) {
Suggestion:
if (message != null && message.contains("Overflow in constant pool size for hidden class")) {
but isn't this the message you expect to see?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27964#discussion_r2467795643
More information about the hotspot-runtime-dev
mailing list