RFR: 8341976: C2: use_mem_state != load->find_exact_control(load->in(0)) assert failure [v2]
Roland Westrelin
roland at openjdk.org
Fri Mar 14 10:10:12 UTC 2025
On Tue, 18 Feb 2025 16:10:22 GMT, Damon Fenacci <dfenacci at openjdk.org> wrote:
> > Thanks for the report. I can't reproduce it, though. Do you pass any command line options?
>
> Nothing specific, just a simple `jtreg` command with a debug build and no extra options, i.e. `jtreg -va -jdk:../build/linux-x64-debug/jdk test/hotspot/jtreg/compiler/arraycopy/TestArrayCopyOverflowInBoundChecks.java` on a Intel Xeon machine (with avx512) with Ubuntu.
That failure appears to be caused by a bug in `ArrayCopyNode::may_modify()`. That code is used to find if an array copy writes to a particular memory slice. It handles graph shapes for array copy before (`ArrayCopyNode`) and after expansion (`CallNode` + `MemBarNode`). For that it does some pattern matching that breaks when `ArrayOperationPartialInlineSize` is not zero: then, there's an extra `Region` that the current code doesn't expect. Rather than fix the pattern matching, I propose always marking the trailing `MemBar` as is already done in some case. That should make that code more robust (and more conservative).
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23465#issuecomment-2724224298
More information about the hotspot-compiler-dev
mailing list