RFR: 8231955: ARM32: Address displacement is 0 for volatile field access because of Unsafe field access.

christoph.goettschkes at microdoc.com christoph.goettschkes at microdoc.com
Tue Oct 15 07:30:16 UTC 2019


Is there anyone who could take a look at this change and give feedback 
please?

Thanks,
Christoph

"hotspot-compiler-dev" <hotspot-compiler-dev-bounces at openjdk.java.net> 
wrote on 2019-10-10 16:29:11:

> From: christoph.goettschkes at microdoc.com
> To: hotspot-compiler-dev at openjdk.java.net
> Date: 2019-10-10 16:35
> Subject: RFR: 8231955: ARM32: Address displacement is 0 for volatile 
field 
> access because of Unsafe field access.
> Sent by: "hotspot-compiler-dev" 
<hotspot-compiler-dev-bounces at openjdk.java.net>
> 
> Hi,
> 
> please review the following changeset. This patch fixes the volatile 
field 
> access for 32-bit ARM. The functions LIRGenerator::volatile_field_store 
> and LIRGenerator::volatile_field_load both assume that the displacement 
> for the given address is always 0. Both use the given address and pass 
the 
> values to add_large_constant() [1], which asserts that the given 
> displacement is not 0. The change does not call add_large_constant if 
the 
> given displacement is 0. The displacement can be 0, because of the 
> implementation of the unsafe intrinsics. This happens, because the 
offset 
> into the object from which the field is accessed is not a constant 
value.
> 
> This fixes the hotspot tier1 tests mentioned in the issue.
> 
> Bug: https://bugs.openjdk.java.net/browse/JDK-8231955
> Webrev: https://cr.openjdk.java.net/~bulasevich/8231955/webrev.00/
> 
> Thanks,
> Christoph
> 
> [1] 
> 
https://hg.openjdk.java.net/jdk/jdk/file/30a9612a657d/src/hotspot/cpu/arm/
> c1_LIRGenerator_arm.cpp#l166
> 



More information about the hotspot-compiler-dev mailing list