RFR: 8290246: test fails "assert(init != __null) failed: initialization not found"
Vladimir Kozlov
kvn at openjdk.org
Thu Jul 14 20:35:06 UTC 2022
On Thu, 14 Jul 2022 19:47:10 GMT, Dean Long <dlong at openjdk.org> wrote:
>> 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
>
> src/hotspot/share/opto/callnode.cpp line 1633:
>
>> 1631: if (init == NULL) {
>> 1632: return NULL; // Return NULL if dead path
>> 1633: }
>
> Can all callers deal with NULL? It looks like GraphKit::array_ideal_length() will crash if make_ideal_length() returns NULL.
>
> This fix looks different from what you proposed in the bug report:
>> Or attach CastII(length) to Allocate node control projection if Initialize node is not present. As I said before we may have legal cases like that (as I remember when working on EA).
You are right, I should return original `length` instead without Cast.
I thought more about my original proposal to attach new CatII(length) to allocation's control projection. But decide that it could be risky. So I decide to keep original length but made mistake by return NULL instead.
I will update the fix.
-------------
PR: https://git.openjdk.org/jdk/pull/9497
More information about the hotspot-compiler-dev
mailing list