[PATCH] 8202414: Unsafe crash in C2

Andrew Haley aph at redhat.com
Mon Sep 10 18:29:47 UTC 2018


On 09/10/2018 04:59 PM, Schmidt, Lutz wrote:
> To my understanding, putInt() is not designed for unaligned accesses. Even "worse", it relies on the store address to be at least 4-byte aligned. That's what I learn e.g. from http://www.docjar.com/docs/api/sun/misc/Unsafe.html. And that's the reason why your code (sometimes) destroys the length field of the ArrayObject header.

Exactly: user error, don't do that. The doc is clear, I think.

-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671


More information about the hotspot-compiler-dev mailing list