[aarch64-port-dev ] RFR:8246051:[AArch64]SIGBUS by unaligned Unsafe compare_and_swap
Wang Zhuo(Zhuoren)
zhuoren.wz at alibaba-inc.com
Wed Jun 3 09:59:57 UTC 2020
Andrew, thanks for the detailed explanation. Could you help push this patch, or I need to wait for other reviews?
Regards,
Zhuoren
------------------------------------------------------------------
From:Andrew Haley <aph at redhat.com>
Sent At:2020 Jun. 2 (Tue.) 17:44
To:Sandler <zhuoren.wz at alibaba-inc.com>; Nick Gasson <nick.gasson at arm.com>
Cc:hotspot-compiler-dev at openjdk.java.net <hotspot-compiler-dev at openjdk.java.net>; aarch64-port-dev <aarch64-port-dev at openjdk.java.net>
Subject:Re: [aarch64-port-dev ] RFR:8246051:[AArch64]SIGBUS by unaligned Unsafe compare_and_swap
On 02/06/2020 09:29, Wang Zhuo(Zhuoren) wrote:
> Updated the test. Not AArch64-only now.
> http://cr.openjdk.java.net/~wzhuo/8246051/webrev.02/
OK, looks good. It should work on PPC and similar as well.
> BTW, the behavior of unaligned Unsafe swap on aarch64(throw
> InternalError) are different from on X86(do the swap). Not sure
> whether the difference makes sence.
We need to make sure that the VM doesn't error out and exit; there's
not much more we can do.
It's all rather horrible. "Accesses to cacheable memory that are split
across cache lines and page boundaries are not guaranteed to be atomic
by the Intel Core 2 Duo, Intel (r) AtomTM, Intel Core Duo, Pentium M,
Pentium 4, Intel Xeon, P6 family, Pentium, and Intel486
processors. The Intel Core 2 Duo, Intel Atom, Intel Core Duo, Pentium
M, Pentium 4, Intel Xeon, and P6 family processors provide bus control
signals that permit external memory subsystems to make split accesses
atomic; however, nonaligned data accesses will seriously impact the
performance of the processor and should be avoided."
https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-vol-3a-part-1-manual.pdf
Aiee! Run away! :-)
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the aarch64-port-dev
mailing list