Integrated: 8262295: C2: Out-of-Bounds Array Load from Clone Source

Richard Reingruber rrich at openjdk.java.net
Thu Mar 25 06:55:43 UTC 2021


On Wed, 24 Feb 2021 17:35:18 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

> This c2 fix makes the optimization of loads from the result array of a
> Object.clone() call dependent on a compile time range check in order to prevent
> out-of-bounds array loads described in JDK-8262295.
> 
> Testing: The included reproducer test. The fix passed also our CI testing: JCK
> and JTREG, also in Xcomp mode, SPECjvm2008, SPECjbb2015, SAP specific tests with
> fastdebug and release builds on all platforms.
> 
> Alternatively the transformed load could be made dependent on a range check at
> runtime. Based on our automated benchmarking it wouldn't be worth
> it. Our benchmark results include quite a bit of noise though.

This pull request has now been integrated.

Changeset: 9689863a
Author:    Richard Reingruber <rrich at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/9689863a
Stats:     120 lines in 2 files changed: 119 ins; 0 del; 1 mod

8262295: C2: Out-of-Bounds Array Load from Clone Source

Reviewed-by: kvn, roland, neliasso, thartmann

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

PR: https://git.openjdk.java.net/jdk/pull/2708


More information about the hotspot-compiler-dev mailing list