diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h index 0172e73a7052..c83c6724e593 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h +++ b/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h @@ -273,9 +273,9 @@ class AllocatorGlobalStats : public AllocatorStats { if (stats == this) break; } - // All stats must be positive. + // All stats must be non-negative. for (int i = 0; i < AllocatorStatCount; i++) - s[i] = ((sptr)s[i]) > 0 ? s[i] : 1; + s[i] = ((sptr)s[i]) >= 0 ? s[i] : 0; } private: