diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2014-07-28 13:54:18 +0000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2014-07-28 13:54:18 +0000 |
| commit | 3baf5b390d5027f8cd652946df0e8cb67b1c794d (patch) | |
| tree | a3572f45431afab2580dc750ec31de856bf52f87 | |
| parent | 595683da00a7d4725de12e11e70abea7e73127b9 (diff) | |
| download | bcm5719-llvm-3baf5b390d5027f8cd652946df0e8cb67b1c794d.tar.gz bcm5719-llvm-3baf5b390d5027f8cd652946df0e8cb67b1c794d.zip | |
tsan: add a useful debug check
llvm-svn: 214082
| -rw-r--r-- | compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h b/compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h index 2c2e75e4438..a1cf84b8f16 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h +++ b/compiler-rt/lib/tsan/rtl/tsan_dense_alloc.h @@ -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; |

