Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue #348

  • Loading branch information...
commit 2bcc300a0ff22d426e012085e8464fa73d6417dc 1 parent 4c93fc2
@hintjens hintjens authored
View
14 builds/valgrind/valgrind.supp
@@ -0,0 +1,14 @@
+{
+ <socketcall_sendto>
+ Memcheck:Param
+ socketcall.sendto(msg)
+ fun:send
+ ...
+}
+{
+ <socketcall_sendto>
+ Memcheck:Param
+ socketcall.send(msg)
+ fun:send
+ ...
+}
View
1  builds/valgrind/vg
@@ -0,0 +1 @@
+valgrind --tool=memcheck --leak-check=full --suppressions=valgrind.supp $*
View
48 src/object.cpp
@@ -159,9 +159,6 @@ void zmq::object_t::send_stop ()
// 'stop' command goes always from administrative thread to
// the current object.
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = this;
cmd.type = command_t::stop;
ctx->send_command (tid, cmd);
@@ -173,9 +170,6 @@ void zmq::object_t::send_plug (own_t *destination_, bool inc_seqnum_)
destination_->inc_seqnum ();
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::plug;
send_command (cmd);
@@ -185,9 +179,6 @@ void zmq::object_t::send_own (own_t *destination_, own_t *object_)
{
destination_->inc_seqnum ();
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::own;
cmd.args.own.object = object_;
@@ -201,9 +192,6 @@ void zmq::object_t::send_attach (session_base_t *destination_,
destination_->inc_seqnum ();
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::attach;
cmd.args.attach.engine = engine_;
@@ -217,9 +205,6 @@ void zmq::object_t::send_bind (own_t *destination_, pipe_t *pipe_,
destination_->inc_seqnum ();
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::bind;
cmd.args.bind.pipe = pipe_;
@@ -229,9 +214,6 @@ void zmq::object_t::send_bind (own_t *destination_, pipe_t *pipe_,
void zmq::object_t::send_activate_read (pipe_t *destination_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::activate_read;
send_command (cmd);
@@ -241,9 +223,6 @@ void zmq::object_t::send_activate_write (pipe_t *destination_,
uint64_t msgs_read_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::activate_write;
cmd.args.activate_write.msgs_read = msgs_read_;
@@ -253,9 +232,6 @@ void zmq::object_t::send_activate_write (pipe_t *destination_,
void zmq::object_t::send_hiccup (pipe_t *destination_, void *pipe_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::hiccup;
cmd.args.hiccup.pipe = pipe_;
@@ -265,9 +241,6 @@ void zmq::object_t::send_hiccup (pipe_t *destination_, void *pipe_)
void zmq::object_t::send_pipe_term (pipe_t *destination_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::pipe_term;
send_command (cmd);
@@ -276,9 +249,6 @@ void zmq::object_t::send_pipe_term (pipe_t *destination_)
void zmq::object_t::send_pipe_term_ack (pipe_t *destination_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::pipe_term_ack;
send_command (cmd);
@@ -288,9 +258,6 @@ void zmq::object_t::send_term_req (own_t *destination_,
own_t *object_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::term_req;
cmd.args.term_req.object = object_;
@@ -300,9 +267,6 @@ void zmq::object_t::send_term_req (own_t *destination_,
void zmq::object_t::send_term (own_t *destination_, int linger_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::term;
cmd.args.term.linger = linger_;
@@ -312,9 +276,6 @@ void zmq::object_t::send_term (own_t *destination_, int linger_)
void zmq::object_t::send_term_ack (own_t *destination_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = destination_;
cmd.type = command_t::term_ack;
send_command (cmd);
@@ -323,9 +284,6 @@ void zmq::object_t::send_term_ack (own_t *destination_)
void zmq::object_t::send_reap (class socket_base_t *socket_)
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = ctx->get_reaper ();
cmd.type = command_t::reap;
cmd.args.reap.socket = socket_;
@@ -335,9 +293,6 @@ void zmq::object_t::send_reap (class socket_base_t *socket_)
void zmq::object_t::send_reaped ()
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = ctx->get_reaper ();
cmd.type = command_t::reaped;
send_command (cmd);
@@ -346,9 +301,6 @@ void zmq::object_t::send_reaped ()
void zmq::object_t::send_done ()
{
command_t cmd;
-#if defined ZMQ_MAKE_VALGRIND_HAPPY
- memset (&cmd, 0, sizeof (cmd));
-#endif
cmd.destination = NULL;
cmd.type = command_t::done;
ctx->send_command (ctx_t::term_tid, cmd);
Please sign in to comment.
Something went wrong with that request. Please try again.