RFC: 8262295: C2: Out-of-Bounds Array Load from Clone Source
Roland Westrelin
rwestrel at redhat.com
Thu Feb 25 11:55:04 UTC 2021
Hi Richard,
> 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
The bug is not visible.
> 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.
Keeping the original control would seem like the best fix. What error do
you get with it? Maybe keeping the cloned load's memory unchanged helps?
Roland.
More information about the hotspot-compiler-dev
mailing list