[jdk11u-dev] RFR: 8299677: Formatter.format might take a long time to format an integer or floating-point

Paul Hohensee phh at openjdk.org
Wed Jan 18 18:53:26 UTC 2023


On Tue, 17 Jan 2023 18:17:08 GMT, Paul Hohensee <phh at openjdk.org> wrote:

> Simple almost clean backport of a potential DOS attack vector fix. Backport from JDK 17 (see https://github.com/openjdk/jdk17u-dev/pull/1077) is clean. Copyright date conflict, plus changed
> 
> Flags.contains(f, Flags.ZERO_PAD)
> 
> to
> 
> f.contains(Flags.ZERO_PAD)
> 
> Passes new and old Formatter tests.

The pre-submit test failures occur because the new test, Padding.java, fails compilation by jtreg because Padding.java imports org.junit.jupiter. The latter is available in jtreg version 7.2, which I run on my test machines, but is not available in the version of jtreg used to run the pre-submit tests. The jtreg version used to run the pre-submit tests should be upgraded because otherwise backporting new tests will difficult/impossible without rewrites.

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

PR: https://git.openjdk.org/jdk11u-dev/pull/1667


More information about the jdk-updates-dev mailing list