[9] RFR (S): 8155635: C2: Mixed unsafe oop accesses break alias analysis
John Rose
john.r.rose at oracle.com
Wed Aug 24 18:56:08 UTC 2016
On Aug 24, 2016, at 11:47 AM, Vladimir Ivanov <vladimir.x.ivanov at oracle.com> wrote:
>
> http://cr.openjdk.java.net/~vlivanov/8155635/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8155635
>
> SplitIf transformation can produce untyped pointers when slitting AddP
> nodes for unsafe accesses through a Phi which merges non-null & null values:
> AddP ... (Phi (ConP #NULL) (CheckCastPP Oop:...:NotNull))
>
> LibraryCallKit::inline_unsafe_access() produces such code shape for mixed oop accesses.
>
> The fix removes special case for mixed unsafe oop accesses in inline_unsafe_access(), so they are treated as if they are always on-heap. Off-heap oop accesses are dangerous and most likely crash in GC barriers anyway.
>
> It's a repeated attempt to fix the bug (previous thread [1]).
>
> Initially, I tried to convert between on-heap & raw pointers, but based on Vladimir K feedback decided to do a conservative fix. The only known problematic case is Unsafe.putObject.
Yes! Reviewed.
Please get rid of the (void) casts while you are there.
There are many uses of store_to* without the (void),
so I don't think there are linty reasons for the cast.
— John
More information about the hotspot-compiler-dev
mailing list