RFR: 8331085: Crash in MergePrimitiveArrayStores::is_compatible_store()

Christian Hagedorn chagedorn at openjdk.org
Tue May 7 06:25:52 UTC 2024


On Mon, 6 May 2024 11:25:22 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

> In the `MergeStore` logic, I check the `adr_type()`. But in some rare cases this can be a `nullptr`, I did not expect that.
> 
> Exampe: during IGVN, the address is dying, with TOP somewhere in the inputs.
> 
>    1 Con === 0 [[ ]] #top
> 1022 AddP === _ 1 1 41 [[ 1019 1021 ]] !orig=539,[572] !jvms: Test::dMeth @ bci:223 (line 35)
> 1019 StoreI === 1128 827 1022 1020 [[ 1075 541 1073 574 ]] @int[int:>=0] (java/lang/Cloneable,java/io/Serializable):exact+any *, idx=6; Memory: @null !orig=574,1068 !jvms: Test::dMeth @ bci:227 (line 35)
> 
> I now check for `nullptr`.

Looks good!

test/hotspot/jtreg/compiler/c2/TestMergeStoresNullAdrType.java line 33:

> 31:  *                   -XX:-TieredCompilation -Xcomp
> 32:  *                   -XX:+UnlockDiagnosticVMOptions -XX:+StressIGVN -XX:+StressCCP
> 33:  *                   -XX:RepeatCompilation=1000

Is it really worth to have such a high count? Eventually, it would trigger the bug if the test is executed enough times.

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

Marked as reviewed by chagedorn (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19103#pullrequestreview-2042163459
PR Review Comment: https://git.openjdk.org/jdk/pull/19103#discussion_r1591872327


More information about the hotspot-compiler-dev mailing list