RFR: 8327247: C2 uses up to 2GB of RAM to compile complex string concat in extreme cases [v2]
Claes Redestad
redestad at openjdk.org
Fri Apr 26 08:39:34 UTC 2024
On Fri, 26 Apr 2024 03:14:54 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> 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.
As the original code just had 52 verbatim and I don't know how far we'll want to backport this I think it's fine to leave this at 52.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18953#discussion_r1580682911
More information about the core-libs-dev
mailing list