Re: [16]RFR(S):8249092:InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code

Wang Zhuo(Zhuoren) zhuoren.wz at alibaba-inc.com
Thu Sep 3 02:08:04 UTC 2020


Hi Patric,
The original problem(https://bugs.openjdk.java.net/browse/JDK-8246051) is architecture specific. When running TestUnsafeUnalignedSwap.java on aarch64 platforms, JVM crashes without the fix because aarch64 does not support unaligned compare_and_swap. On X86 platforms the crash cannot be reproduced because X86 support unaligned compare_and_swap.


Regards,
Zhuoren



------------------------------------------------------------------
From:Patric Hedlin <patric.hedlin at oracle.com>
Sent At:2020 Sep. 2 (Wed.) 20:22
To:Sandler <zhuoren.wz at alibaba-inc.com>; aarch64-port-dev <aarch64-port-dev at openjdk.java.net>; hotspot-runtime-dev <hotspot-runtime-dev at openjdk.java.net>
Cc:david.holmes <david.holmes at oracle.com>; rahul.v.raghavan <rahul.v.raghavan at oracle.com>
Subject:Re: [16]RFR(S):8249092:InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code

  Hi Zhuoren,

 I don't actually know what behaviour to expect from the Unsafe atomics in this test-case but perhaps you could re-cap the original problem (addressed in JDK-8246051) since it seems to raise some questions. Did you have an example (real code) where this behaviour is essential?

 Best regards,
 Patric Hedlin

 (Including hotspot-runtime-dev at openjdk.java.net)


On 2020-09-01 07:35, Wang Zhuo(Zhuoren) wrote:

Hi, this is a fix for a test case.
In -Xcomp mode, compiler/unsafe/TestUnsafeUnalignedSwap.java will fail because the catch misses the error due to async exception.
This patch uses a loop to make sure the error can be caught. Also -Xcomp is added in test. 
BUG: https://bugs.openjdk.java.net/browse/JDK-8249092
Patch: http://cr.openjdk.java.net/~wzhuo/8249092/webrev.00/


Regards,
Zhuoren




More information about the hotspot-runtime-dev mailing list