RFR: 8346836: C2: Verify CastII/CastLL bounds at runtime [v9]

Vladimir Ivanov vlivanov at openjdk.org
Thu Apr 10 00:40:32 UTC 2025


On Wed, 9 Apr 2025 18:11:09 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Hi,
>> 
>> This patch adds a develop flag `VerifyConstraintCasts`, which will verify the correctness of `CastIINode`s and `CastLLNode`s at runtime and crash the VM if the dynamic value lies outside the type value range.
>> 
>> Please take a look, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
> 
>   assert CastLL

FTR here's AArch64 support:
  https://github.com/openjdk/jdk/commit/7ed34d09560d9db79183a80df379f3003f79bb1b

Feel free to incorporate it in this PR or I'll upstream it separately..

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

PR Comment: https://git.openjdk.org/jdk/pull/22880#issuecomment-2791267118


More information about the hotspot-compiler-dev mailing list