On Thu, 30 Nov 2023 20:59:01 GMT, Jorn Vernee <jver...@openjdk.org> wrote:

> Need to use `jlong_to_ptr` instead of raw cast.
> 
> I've also fixed another latent issue in `CLayouts` where we were initializing 
> `C_LONG_LONG` with the `long` layout. This was resulting in a class cast 
> exception when running the XorTest benchmark. The size of `long` on Linux x86 
> 32-bits is 4 bytes, so the returned layout has type `ValueLayout.OfInt` which 
> we then try to cast to `ValueLayout.OfLong`, resulting in a CCE. This would 
> also be an issue on Windows.
> 
> Testing: running XorTest benchmark on linux-x86 and windows-x64.

Marked as reviewed by mcimadamore (Reviewer).

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

PR Review: https://git.openjdk.org/jdk/pull/16913#pullrequestreview-1758494120

Reply via email to