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

David Holmes dholmes at openjdk.org
Wed Oct 29 01:30:01 UTC 2025


On Tue, 28 Oct 2025 11:42:36 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Hmm ... then I would prefer simply:
>> 
>> // Don't change the type of cp_size without updating the overflow
>> // check below.
>> u2 cp_size = ...;
>
> That's a comment.  The comment isn't executable.  I prefer something that will fail.

We don't generally do this kind of thing though. We would have tons of code that depends on the type of various variables and we don't assert that those variables have the declared type.

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

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


More information about the hotspot-runtime-dev mailing list