JDK-8285394 : Compiler blackholes can be eliminated due to stale ciMethod::intrinsic_id()
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 17,18,19
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2022-04-21
  • Updated: 2022-05-03
  • Resolved: 2022-04-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 19
19 b20Fixed
Related Reports
Relates :  
Description
This is seen in some tests: if blackhole method is deemed hot for inlining, then at least C2 would inline it without looking back at its intrinsic status. Which silently breaks blackholes.

The cause is that there are *two* places where intrinsic ID is recorded. Current blackhole code only writes down blackhole intrinsic ID in `Method::intrinsic_id()`, but we should also set it in `ciMethod::intrinsic_id()`, which is used from C2 inlining code. `ciMethod` is normally populated from `Method::intrinsic_id()`, but it happens too early, before setting up blackhole intrinsic.
Comments
Fix Request (17u, 18u) Fixes the Blackhole - inliner interactions. Patches does not apply cleanly due to minor test differences. RFRs acked by kvn.
03-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk17u-dev/pull/377 Date: 2022-05-02 10:26:12 +0000
02-05-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18u/pull/116 Date: 2022-05-02 10:13:10 +0000
02-05-2022

Changeset: ce8db2c4 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-04-22 17:11:34 +0000 URL: https://git.openjdk.java.net/jdk/commit/ce8db2c40378de01ce35ca37ec315af47974d6d6
22-04-2022

ILW = miscompilation of benchmarking support functionality; affects benchmarking code; disable inlining of affected methods = MML = P4
22-04-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8344 Date: 2022-04-21 17:02:27 +0000
21-04-2022