RFR (S) 8175887: C1 value numbering handling of Unsafe.get*Volatile is incorrect

Aleksey Shipilev shade at redhat.com
Mon Feb 27 21:25:56 UTC 2017


On 02/27/2017 03:12 PM, Aleksey Shipilev wrote:
> On 02/27/2017 10:53 AM, Aleksey Shipilev wrote:
>> C1 does not have intrinsics for Opaque, and therefore it should delegate Opaque
>> ops to volatile via fallbacks in Unsafe.java. But now I read the C1
>> Unsafe.getObject handling, and my hair stand on end, because I think C1 {L,G}VN
>> does not treat volatile Unsafe ops any specially, while it probably should:
>>  https://bugs.openjdk.java.net/browse/JDK-8175887
>>
>> Makes sense?
> 
> This is the actual reproducible bug, changing the thread subject.
> 
> Fix against jdk9/hs:
>   http://cr.openjdk.java.net/~shade/8175887/webrev.01/

Updated after off-list review (renamed tests, used internal Unsafe):
  http://cr.openjdk.java.net/~shade/8175887/webrev.02/

Everything else still stands:

> Testing: Linux x86_64/release hotspot/test/compiler, includes new tests
> 
> I need a sponsor. I think this bugfix is too important to miss 9, and it even
> deserves backporting to 8u.

-Aleksey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20170227/ddc1b725/signature.asc>


More information about the hotspot-compiler-dev mailing list