[9] RFR(S): 8136818: Test compiler/arraycopy/TestEliminatedArrayCopyDeopt.java fails with "m1 failed"

Vladimir Kozlov vladimir.kozlov at oracle.com
Wed Aug 3 15:20:25 UTC 2016


Good.

Thanks,
Vladimir

On 8/3/16 6:32 AM, Tobias Hartmann wrote:
> Hi,
>
> please review the following patch:
> https://bugs.openjdk.java.net/browse/JDK-8136818
> http://cr.openjdk.java.net/~thartmann/8136818/webrev.00/
>
> The test fails because a non-escaping allocation is removed but re-allocation after deoptimization does not initialize the object with the correct values. The problem is that with -XX:-ReduceInitialCardMarks and -XX:+UseParallelGC we emit a StoreB in the post barrier between the ArrayCopy and the MemBarStoreStore (see GraphKit::write_barrier_post() and graph [1]). PhaseMacroExpand::value_from_mem() -> scan_mem_chain() -> ArrayCopyNode::may_modify() only expects a StoreCM node and therefore does not recognize the initializing ArrayCopy. As a result, the Object is re-allocated with uninitialized values.
>
> I fixed this by adding the Op_StoreB case and moving the checks into ArrayCopyNode::may_modify_helper() to also recognize the card mark stores behind a Phi.
>
> Tested with failing test, JPRT and RBT (running).
>
> Thanks,
> Tobias
>
> [1] https://bugs.openjdk.java.net/secure/attachment/61959/graph.png
>


More information about the hotspot-compiler-dev mailing list