tsan: reset destination range in Java heap move
authorDmitry Vyukov <dvyukov@google.com>
Tue, 21 Sep 2021 19:07:43 +0000 (21:07 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Wed, 22 Sep 2021 05:23:21 +0000 (07:23 +0200)
commitdb2f870fe3dcecc43c874ef571757d5aeac0569c
tree4694c942fcf3994699152cf9fd4054caac90127b
parentced20c6672970ee416147b0fc8f2fb6e733acbc5
tsan: reset destination range in Java heap move

Switch Java heap move to the new scheme required for the new tsan runtime.
Instead of copying the shadow we reset the destination range.
The new v3 trace contains addresses of accesses, so we cannot simply copy the shadow.
This can lead to false negatives, but cannot lead to false positives.

Depends on D110159.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D110190
compiler-rt/lib/tsan/rtl/tsan_interface_java.cpp
compiler-rt/test/tsan/java_move_overlap_race.cpp
compiler-rt/test/tsan/java_race_move.cpp