RFR: 8303513: C2: LoadKlassNode::make fails with 'expecting TypeKlassPtr'

Roberto Castañeda Lozano rcastanedalo at openjdk.org
Wed Jun 14 09:54:33 UTC 2023


This changeset skips the verification at the end of `SubTypeNode::Ideal()` if the bottom type of `obj_or_subklass` is TOP, to avoid violating the contract of `LoadKlassNode::make()`. This can happen for example in transient scenarios where `obj_or_subklass` is a projection of the TOP node, see the [JBS issue description](https://bugs.openjdk.org/browse/JDK-8303513) for more details. The proposed fix has low risk, since it affects debug-only code.

##### Testing:

- tier1-3 (windows-x64, linux-x64, linux-aarch64, macosx-x64, and macosx-aarch64; release and debug mode)

- original RunThese8M test (using `-XX:+UseZGC -XX:+ZGenerational` on linux-x64, 20 repetitions)

Deriving a minimal regression test is ongoing work, but might take some time due to the complex nature of the failure (see analysis on JBS). To reduce noise in test pipelines and ease work on other open RunThese8M issues such as [JDK-8308048](https://bugs.openjdk.org/browse/JDK-8308048), I propose to integrate this fix first and contribute the minimal regression test later as a follow-up enhancement.

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

Commit messages:
 - Skip verification if the bottom type of obj_or_subklass is TOP

Changes: https://git.openjdk.org/jdk/pull/14463/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=14463&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303513
  Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/14463.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/14463/head:pull/14463

PR: https://git.openjdk.org/jdk/pull/14463


More information about the hotspot-compiler-dev mailing list