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

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu May 23 13:09:00 UTC 2019


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.

Best regards,
Vladimir Ivanov

On 23/05/2019 15:39, Tobias Hartmann wrote:
> Hi,
> 
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8224658
> http://cr.openjdk.java.net/~thartmann/8224658/webrev.00/
> 
> We hit an assert in alias analysis when compiling an unsafe off-heap access intrinsic with zero
> address. We should simply bail out in this case because if that code is ever executed, it will crash
> the VM anyway.
> 
> Thanks to Aleksey for reporting the issue and providing the test case.
> 
> Best regards,
> Tobias
> 


More information about the hotspot-compiler-dev mailing list