[jdk21u-dev] RFR: 8324345: Stack overflow during C2 compilation when splitting memory phi
Goetz Lindenmaier
goetz at openjdk.org
Thu May 8 06:36:57 UTC 2025
On Tue, 22 Apr 2025 16:55:51 GMT, Satyen Subramaniam <ssubramaniam at openjdk.org> wrote:
> Backporting JDK-8324345: Stack overflow during C2 compilation when splitting memory phi. In some cases ConnectionGraph::find_inst_mem contains recursive calls that can lead to a native C++ stack overflow - this changeset takes the following action to address this. Adds a simple recursion depth limit to ConnectionGraph::find_inst_mem. When find_inst_mem reaches the limit, we bail out from the current compilation and retry without escape analysis. The depth limit is currently set to a fixed value of 1000, and a regression test `TestFindInstMemRecursion.java`. Also removes the implicit memory limit (due to [JDK-8331185](https://bugs.openjdk.org/browse/JDK-8331185)) from `VectorReplicateLongSpecialImmTest.java`: The memory limit triggers after this changeset, but the (potential) problem is most likely unrelated to this issue, addressed in [JDK-8337821](https://bugs.openjdk.org/browse/JDK-8337821). Ran GHA Sanity Checks, local Tier 1 and 2, and new `test/hotspot/jtreg/compiler/escapeAna
lysis/TestFindInstMemRecursion.java` tests. Patch is clean.
I successfully ran this through SAPs testing.
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1692#issuecomment-2861936007
More information about the jdk-updates-dev
mailing list