Integrated: 8331054: C2 MergeStores: assert failed: unexpected basic type after JDK-8318446 and JDK-8329555

Emanuel Peter epeter at openjdk.org
Wed Apr 24 19:09:34 UTC 2024


On Wed, 24 Apr 2024 14:53:49 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> I just pushed [JDK-8318446](https://bugs.openjdk.org/browse/JDK-8318446), and @jatin-bhateja just pushed a new test with [JDK-8329555](https://bugs.openjdk.org/browse/JDK-8329555).
> 
> Note: this is definitely due to the MergeStores logic from [JDK-8318446](https://bugs.openjdk.org/browse/JDK-8318446).
> With [JDK-8329555](https://bugs.openjdk.org/browse/JDK-8329555), Jatin only added a test that triggers the bug.
> 
> Jatin created a test case, where we have an `array pointer`, but its element type is `bottom`, because it merges multiple different arrays. I attached such an example in the regression test:
> 
> https://github.com/openjdk/jdk/blob/52877b8d5c0c24c256611ceb9cef1d4fb0c40f68/test/hotspot/jtreg/compiler/c2/TestMergeStores.java#L1275-L1297
> 
> The issue is that I assume that array ptr always have a native type. But they can be bottom type, and the BasicType is then T_ILLEGAL, and trying to get the size in bytes leads to the assert.
> 
> **Solution:** just check if the BasicTypes are `is_java_primitive(bt)`.

This pull request has now been integrated.

Changeset: ea3909ac
Author:    Emanuel Peter <epeter at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/ea3909acd117cab97c6c0b496f98f9a4a3a22be4
Stats:     68 lines in 2 files changed: 61 ins; 0 del; 7 mod

8331054: C2 MergeStores: assert failed: unexpected basic type after JDK-8318446 and JDK-8329555

Reviewed-by: thartmann, kvn

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

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


More information about the hotspot-compiler-dev mailing list