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

Coleen Phillimore coleenp at openjdk.org
Mon Nov 3 12:39:57 UTC 2025


On Fri, 31 Oct 2025 20:24:23 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

>> I made this change and reran the VM jck tests.
>
>> Isn't this technically UB behavior? It isn't guaranteed that a u2 will overflow to a low value. It might be safer have cp_size be an int and then guarantee that cp_size < 65535.
> 
> [drive-by comment] Unsigned integer arithmetic is modular arithmetic. Overflow is not UB, it's wrap-around.

Thanks for the drive by info.

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

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


More information about the hotspot-runtime-dev mailing list