RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v2]

Mandy Chung mchung at openjdk.org
Fri Apr 26 03:17:34 UTC 2024


On Thu, 25 Apr 2024 19:53:46 GMT, Claes Redestad <redestad at openjdk.org> wrote:

>> Splitting out the ASM-based version from #18690 to push that first under the JBS (to help backporting). Keeping #18690 open to rebase and follow-up on this as a subtask. See discussion in that #18690 for more details, discussion and motivation for this.
>
> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Remove accidental use of java.lang.classfile

src/java.base/share/classes/java/lang/invoke/StringConcatFactory.java line 1057:

> 1055:      */
> 1056:     private static final class SimpleStringBuilderStrategy {
> 1057:         static final int CLASSFILE_VERSION = 52; // JDK 8

Alternatively, this can use `ClassFileFormatVersion.latest().major()` which exists since JDK 20.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18953#discussion_r1580432036


More information about the core-libs-dev mailing list