From 01734e6d4bcba3d1965858cf2960e7a408290eac Mon Sep 17 00:00:00 2001 From: Zygo Blaxell Date: Mon, 13 Dec 2021 23:48:12 -0500 Subject: [PATCH] hash: initialize m_dirty in BeesHashTable It turns out we never set m_dirty's initial value. This is not a practical problem because 1) it's mostly harmless if m_dirty is spuriously true, 2) we set it to true every time bees scans a data block, and 3) the allocation happens early in startup when most memory allocations are using zero-filled pages, so it's probably getting a false value at construction in most cases. valgrind complains about it, so it has to go. Signed-off-by: Zygo Blaxell --- src/bees.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bees.h b/src/bees.h index 565b691..3d920f8 100644 --- a/src/bees.h +++ b/src/bees.h @@ -459,7 +459,7 @@ private: // Mutex/condvar for the writeback thread mutex m_dirty_mutex; condition_variable m_dirty_condvar; - bool m_dirty; + bool m_dirty = false; // Mutex/condvar to stop mutex m_stop_mutex;