RFR: 8331054: C2 MergeStores: assert failed: unexpected basic type after JDK-8318446 and JDK-8329555 [v2]
Emanuel Peter
epeter at openjdk.org
Wed Apr 24 15:15:40 UTC 2024
> 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)`.
Emanuel Peter has updated the pull request incrementally with one additional commit since the last revision:
whitespace
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/18935/files
- new: https://git.openjdk.org/jdk/pull/18935/files/52877b8d..ff75d165
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=18935&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=18935&range=00-01
Stats: 8 lines in 1 file changed: 0 ins; 0 del; 8 mod
Patch: https://git.openjdk.org/jdk/pull/18935.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/18935/head:pull/18935
PR: https://git.openjdk.org/jdk/pull/18935
More information about the hotspot-compiler-dev
mailing list