diff options
| -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; |

