On Tue, 12 May 2026 13:43:01 GMT, Tobias Hartmann <[email protected]> wrote:

> Mainline fix [JDK-8373248](https://bugs.openjdk.org/browse/JDK-8373248) added 
> additional code to verify that a `CastPPNode` does not change the type and we 
> now assert when casting the value of an unsafe flat access to the proper 
> type. The `CastPP` should be replaced by a `CheckCastPP`.
> 
> Thanks,
> Tobias
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

Thanks Quan Anh!

> There are other problematic CastPPNodes in 
> LibraryCallKit::inline_unsafe_flat_access. I think they do not result in 
> assert

I looked at those two and they seem ok to me because they don't change the type 
but just its properties:

https://github.com/openjdk/valhalla/blob/f39fa97e6905c6cad790b97aad663b6a4e2040a2/src/hotspot/share/opto/library_call.cpp#L2747-L2748

https://github.com/openjdk/valhalla/blob/f39fa97e6905c6cad790b97aad663b6a4e2040a2/src/hotspot/share/opto/library_call.cpp#L2762-L2764

But I agree, let's fix those later if need be.

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

PR Comment: https://git.openjdk.org/valhalla/pull/2425#issuecomment-4432659348

Reply via email to