RFR: 8364360: Defining hidden class with no room in constant pool crashes the VM [v2]

Coleen Phillimore coleenp at openjdk.org
Tue Oct 28 11:51:06 UTC 2025


On Tue, 28 Oct 2025 03:50:06 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> 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?

It should be message != null and !message.contains("the expected message");

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27964#discussion_r2469241763


More information about the hotspot-runtime-dev mailing list