From 8fdfa2c5f665a9ccfc25ee63189d464d78b4a266 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Tue, 8 Jan 2019 14:17:40 +0100 Subject: [PATCH] Zero out qtype response numbers in our statistics Although you might think otherwise, and I frequently do, atomic counters do not get zero-initialized. With this PR, we do this by hand. This makes valgrind usable again on auth. --- pdns/responsestats.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pdns/responsestats.cc b/pdns/responsestats.cc index c98db9ad4..64ec3abe4 100644 --- a/pdns/responsestats.cc +++ b/pdns/responsestats.cc @@ -19,6 +19,8 @@ ResponseStats::ResponseStats() : d_qtypecounters(new std::atomic::max(),0)); + for(unsigned int n =0 ; n < 65535; ++n) + d_qtypecounters[n] = 0; } ResponseStats g_rs; -- 2.50.0