Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
tsan: relaxed check in CheckShadowMapping
Browse files Browse the repository at this point in the history
Some platforms use strange addresses in shadow mapping.
E.g. aarch64/42vma:
  static const uptr kHiAppMemEnd   = 0x3ffffffffffull;
instead of 0x40000000000ull (the range is half-open).
This caused bot failures after r282405:
http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/12242/steps/ninja%20check%201/logs/FAIL%3A%20SanitizerCommon-tsan-aarch64-Linux%3A%3Aclock_gettime.c
Relaxed the new check in CheckShadowMapping to not expect round addresses.



git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@282407 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dvyukov committed Sep 26, 2016
1 parent 20adfa2 commit 515106e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/tsan/rtl/tsan_rtl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ static void CheckShadowMapping() {
uptr prev = 0;
for (uptr p0 = beg; p0 <= end; p0 += (end - beg) / 4) {
for (int x = -(int)kShadowCell; x <= (int)kShadowCell; x += kShadowCell) {
const uptr p = p0 + x;
CHECK_EQ(p, RoundDown(p, kShadowCell));
const uptr p = RoundDown(p0 + x, kShadowCell);
if (p < beg || p >= end)
continue;
const uptr s = MemToShadow(p);
Expand Down

0 comments on commit 515106e

Please sign in to comment.