From 3de9ca068fba8d31606e3b097ac468ee8064de7c Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 28 May 2012 07:45:35 +0000 Subject: [PATCH] tsan: use DCHECK_GT/LT instead of plain DCHECK (better diagnostics) llvm-svn: 157567 --- compiler-rt/lib/tsan/rtl/tsan_rtl.cc | 8 ++++---- 1 file 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 c93bdcf87e14..2a2fcc3c6c56 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--; }