[compiler-rt] r214082 - tsan: add a useful debug check
Dmitry Vyukov
dvyukov at google.com
Mon Jul 28 06:54:18 PDT 2014
Author: dvyukov
Date: Mon Jul 28 08:54:18 2014
New Revision: 214082
URL: http://llvm.org/viewvc/llvm-project?rev=214082&view=rev
Log:
tsan: add a useful debug check
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_dense_alloc.h
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_dense_alloc.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_dense_alloc.h?rev=214082&r1=214081&r2=214082&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_dense_alloc.h (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_dense_alloc.h Mon Jul 28 08:54:18 2014
@@ -65,6 +65,7 @@ class DenseSlabAlloc {
}
void Free(Cache *c, IndexT idx) {
+ DCHECK_NE(idx, 0);
if (c->pos == Cache::kSize)
Drain(c);
c->cache[c->pos++] = idx;
More information about the llvm-commits
mailing list