RFC: 8262295: C2: Out-of-Bounds Array Load from Clone Source
Reingruber, Richard
richard.reingruber at sap.com
Wed Feb 24 20:03:41 UTC 2021
Hi,
I've been working on a fix for
JDK-8262295: C2: Out-of-Bounds Array Load from Clone Source
https://bugs.openjdk.java.net/browse/JDK-8262295
Now I'm not sure if the fix I found (compile time range check) is a good one.
I have created a draft PR with the fix not yet ready for proper review:
https://github.com/openjdk/jdk/pull/2708
Please let me know what you think and if this is the right approach.
My first attempt was to keep the original control for the cloned node in
LoadNode::can_see_arraycopy_value() but this seemd to confuse loop
optimizations. At least the test compiler/escapeAnalysis/TestMissingAntiDependency.java
failed with that change.
Another potential fix could be adding a runtime range check.
What do you think?
Thanks, Richard.
More information about the hotspot-compiler-dev
mailing list