diff options
author | Dmitry Vyukov <dvyukov@google.com> | 2012-05-28 07:45:35 +0000 |
---|---|---|
committer | Dmitry Vyukov <dvyukov@google.com> | 2012-05-28 07:45:35 +0000 |
commit | 3de9ca068fba8d31606e3b097ac468ee8064de7c (patch) | |
tree | ceeac0c8981aa44f5d0eb2bbfcad1fa04ec3703b | |
parent | 2d4e3c140f37f5cc2d69483f6347f38eafbcbc50 (diff) | |
download | bcm5719-llvm-3de9ca068fba8d31606e3b097ac468ee8064de7c.tar.gz bcm5719-llvm-3de9ca068fba8d31606e3b097ac468ee8064de7c.zip |
tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics)
llvm-svn: 157567
-rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc index c93bdcf87e1..2a2fcc3c6c5 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc @@ -443,8 +443,8 @@ void FuncEntry(ThreadState *thr, uptr pc) { // Shadow stack maintenance can be replaced with // stack unwinding during trace switch (which presumably must be faster). - DCHECK(thr->shadow_stack_pos >= &thr->shadow_stack[0]); - DCHECK(thr->shadow_stack_pos < &thr->shadow_stack[kShadowStackSize]); + DCHECK_GE(thr->shadow_stack_pos, &thr->shadow_stack[0]); + DCHECK_LT(thr->shadow_stack_pos, &thr->shadow_stack[kShadowStackSize]); thr->shadow_stack_pos[0] = pc; thr->shadow_stack_pos++; } @@ -456,8 +456,8 @@ void FuncExit(ThreadState *thr) { thr->fast_state.IncrementEpoch(); TraceAddEvent(thr, thr->fast_state.epoch(), EventTypeFuncExit, 0); - DCHECK(thr->shadow_stack_pos > &thr->shadow_stack[0]); - DCHECK(thr->shadow_stack_pos < &thr->shadow_stack[kShadowStackSize]); + DCHECK_GT(thr->shadow_stack_pos, &thr->shadow_stack[0]); + DCHECK_LT(thr->shadow_stack_pos, &thr->shadow_stack[kShadowStackSize]); thr->shadow_stack_pos--; } |