[13] RFR(S): 8224658: Unsafe access C2 compile fails with assert(flat != TypePtr::BOTTOM) failed: cannot alias-analyze an untyped ptr: adr_type = NULL

Tobias Hartmann tobias.hartmann at oracle.com
Thu May 23 13:21:56 UTC 2019

Hi Vladimir,

thanks for looking at this.

On 23.05.19 15:09, Vladimir Ivanov wrote:
> The fix should work fine for Unsafe.getXxx(0) case, but what if address turns into 0 later? For
> example, I don't see a reason why it can't theoretically happen in presence of post-parse inlining
> happening in effectively unreachable code.

Yes that's possible and I thought it doesn't matter because we won't hit that assert during IGVN.
I've just checked in detail and C2 actually completely removes the unsafe access in that case which
is obviously incorrect.

I'll come back once I have a fix ready.


More information about the hotspot-compiler-dev mailing list