RFR: 8336256: memcpy short value to int local is incorrect in VtableStubs::unsafe_hash
Thomas Stuefe
stuefe at openjdk.org
Fri Jul 12 08:29:50 UTC 2024
On Fri, 12 Jul 2024 08:16:18 GMT, Richard Reingruber <rrich at openjdk.org> wrote:
> > Was that a big endian problem?
>
> We got the crashes given in the JBS issue (see above) when building on PPC64 big endian (AIX and Linux). I do think this is also incorrect with little endian order since excessive bytes after `VtableStub::_index` are copied into the local variable `vtable_index`. On LE the excessive bytes are in the high word of `vtable_index`. Maybe they are masked out by the hash function. On BE the excessive bytes end up in the low word and the short value from `_index` ends up in the high word of `vtable_index` and the hash function would mask away the bytes from `_index`.
>
> @offamitkumar have you observed the issues too on S390?
@reinrich thanks for clarifying :)
in any case, patch makes sense
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20137#issuecomment-2225080751
More information about the hotspot-compiler-dev
mailing list