BIND 10 master, updated. 38a875a2d8c9337c1019b11473f989519e16a778 [master] make sure 0-clear test buffer to suppress valgrind warnings
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri May 17 23:24:47 UTC 2013
The branch, master has been updated
via 38a875a2d8c9337c1019b11473f989519e16a778 (commit)
from a41cac4287573ff826bdad6e9ec61b5991c757e1 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 38a875a2d8c9337c1019b11473f989519e16a778
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri May 17 16:23:47 2013 -0700
[master] make sure 0-clear test buffer to suppress valgrind warnings
confirmed locally, and should be trivial, so I'm committing it directly.
-----------------------------------------------------------------------
Summary of changes:
src/lib/asiolink/tests/local_socket_unittest.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
-----------------------------------------------------------------------
diff --git a/src/lib/asiolink/tests/local_socket_unittest.cc b/src/lib/asiolink/tests/local_socket_unittest.cc
index b851ca3..72efd6e 100644
--- a/src/lib/asiolink/tests/local_socket_unittest.cc
+++ b/src/lib/asiolink/tests/local_socket_unittest.cc
@@ -22,6 +22,7 @@
#include <boost/bind.hpp>
#include <csignal>
+#include <cstring>
#include <vector>
#include <sys/socket.h>
@@ -185,8 +186,10 @@ TEST_F(LocalSocketTest, asyncPartialRead) {
alarm(IO_TIMEOUT);
// specify reading 4 bytes of data, and send 3 bytes. It shouldn't cause
- // callback.
+ // callback. while we actually don't use the buffer, we'll initialize it
+ // to make valgrind happy.
char recv_buf[4];
+ std::memset(recv_buf, 0, sizeof(recv_buf));
bool callback_called = false;
LocalSocket sock(io_service_, sock_pair_[0].release());
sock.asyncRead(boost::bind(&callback, _1, &io_service_, &callback_called,
More information about the bind10-changes
mailing list