[jdk21u-dev] RFR: 8324345: Stack overflow during C2 compilation when splitting memory phi
duke
duke at openjdk.org
Thu May 8 17:06:56 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.
@satyenme
Your change (at version 012db9d608271f6dc04ecf2249b9cee7513890bf) is now ready to be sponsored by a Committer.
-------------
PR Comment: https://git.openjdk.org/jdk21u-dev/pull/1692#issuecomment-2863726073
More information about the jdk-updates-dev
mailing list