RFR: 8290246: test fails "assert(init != __null) failed: initialization not found"

Vladimir Kozlov kvn at openjdk.org
Thu Jul 14 18:16:31 UTC 2022


CTW test (which compiles methods without running them - no profiling) failed when run with stress flag and particular RNG seed `-XX:+StressIGVN -XX:StressSeed=1743550013`. The failure is intermittent because of RNG.

The compiled method [BasicPopupMenuUI$BasicMenuKeyListener::menuKeyPressed()](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java#L331) has allocation in loop at line [L360](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPopupMenuUI.java#L360) which is followed by call `item.isArmed()` at line L366. This call is not "linked" and uncommon trap is generated for it. As result the allocation result become un-used.
Due to shuffling done with `StressIGVN` flag LoadRangeNode is processed after InitializeNode is removed from graph but AllocateArrayNode is not. We hit assert because of that.

The fix replaces the assert with check.

Tested with replay file from bug report. I was not able to reproduce failure with standalone test because it is hard to force LoadRangeNode processing at right time. I attached to bug report a test which work on.

Testing tier1-3,xcomp

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

Commit messages:
 - 8290246: test fails "assert(init != __null) failed: initialization not found"

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

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


More information about the hotspot-compiler-dev mailing list