From f87888f80c57a45e247eb662b6e17c1aabccf6ad Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Fri, 5 Feb 2016 14:41:03 +0000 Subject: [PATCH] Problem: test_router_mandatory_hwm uses unitialised memory Solution: memset temporary buffer before use to reduce Valgrind noise --- tests/test_router_mandatory_hwm.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_router_mandatory_hwm.cpp b/tests/test_router_mandatory_hwm.cpp index 81b8fc63..c2c529a0 100644 --- a/tests/test_router_mandatory_hwm.cpp +++ b/tests/test_router_mandatory_hwm.cpp @@ -83,6 +83,7 @@ int main (void) int i; const int BUF_SIZE = 65536; char buf[BUF_SIZE]; + memset(buf, 0, BUF_SIZE); // Send first batch of messages for(i = 0; i < 100000; ++i) { if (TRACE_ENABLED) fprintf(stderr, "Sending message %d ...\n", i);