[jdk8u-dev] RFR: 8271459: C2: Missing NegativeArraySizeException when creating StringBuilder with negative capacity

Roland Westrelin roland at openjdk.org
Tue Oct 11 15:43:42 UTC 2022


On Tue, 11 Oct 2022 15:38:08 GMT, Roland Westrelin <roland at openjdk.org> wrote:

>> Hi!
>> 
>> Here is a backport of JDK-8271459 that fixes lost NegativeArraySizeException on using StringBuilder of negative capacity. The patch from jdk-11 is applied cleanly except the path suffling.
>> 
>> Verification (amd64/Ubuntu 20.04): the reproducer from JBS throws 10000 of 10000 exceptions, and only ~55% (behaviour is non-deterministic) before the patch is applied
>> 
>> Regression: hotspot/test/runtime
>
> That looks good to me. Why not include the test case?

> @rwestrel Could you please review this? Does that look OK to you for 8u inclusion?

@jerboaa backporting this is reasonable I think.

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

PR: https://git.openjdk.org/jdk8u-dev/pull/111


More information about the jdk8u-dev mailing list