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

Vladimir Kozlov kvn at openjdk.java.net
Tue Aug 17 19:18:25 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

Good.

I assume you are talking about this existing null check code for virtual call receiver:
[callGenerator.cpp#L242](
https://github.com/openjdk/jdk/blob/master/src/hotspot/share/opto/callGenerator.cpp#L242)

I don't see link to testing in bug report.

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

Marked as reviewed by kvn (Reviewer).

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


More information about the hotspot-compiler-dev mailing list