RFR: 8271276: C2: Wrong JVM state used for receiver null check

Tobias Hartmann thartmann at openjdk.java.net
Wed Aug 18 04:58:21 UTC 2021


On Tue, 17 Aug 2021 17:21:11 GMT, Vladimir Ivanov <vlivanov at openjdk.org> wrote:

> JDK-8257211 enabled call devirtualization during post-parse phase. When a virtual call is replaced, there is a receiver null check inserted, but wrong JVM state is picked up (arguments vs locals). (`GraphKit::null_check_receiver_before_call()` should have been used instead).
> 
> Instead of fixing the problematic null check, I decided to completely remove it because it is redundant: all relevant `CallGenerator`s already issue a receiver null check when one is required.   
> 
> Testing: hs-tier1 - hs-tier6

Looks good.

-------------

Marked as reviewed by thartmann (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5150


More information about the hotspot-compiler-dev mailing list