==8804== Thread 4:
==8804== Invalid read of size 1
==8804== at 0x4A08DAC: memcpy (mc_replace_strmem.c:882)
==8804== by 0x4C78163: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:113)
==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284)
==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73)
==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165)
==8804== by 0x4C7128A: thread_routine (thread.cpp:81)
==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so)
==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so)
==8804== Address 0x54171df is 735 bytes inside a block of size 736 free'd
==8804== at 0x4A063F0: free (vg_replace_malloc.c:446)
==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141)
==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83)
==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284)
==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73)
==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165)
==8804== by 0x4C7128A: thread_routine (thread.cpp:81)
==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so)
==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so)
==8804==
==8804== Invalid free() / delete / delete[] / realloc()
==8804== at 0x4A063F0: free (vg_replace_malloc.c:446)
==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141)
==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83)
==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284)
==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73)
==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165)
==8804== by 0x4C7128A: thread_routine (thread.cpp:81)
==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so)
==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so)
==8804== Address 0x5416f00 is 0 bytes inside a block of size 736 free'd
==8804== at 0x4A063F0: free (vg_replace_malloc.c:446)
==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141)
==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83)
==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284)
==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73)
==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165)
==8804== by 0x4C7128A: thread_routine (thread.cpp:81)
==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so)
==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so)
Valgrind out put.
Socket type router dealer. This happens right after ERROR or AGAIN.
==8804== Thread 4: ==8804== Invalid read of size 1 ==8804== at 0x4A08DAC: memcpy (mc_replace_strmem.c:882) ==8804== by 0x4C78163: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:113) ==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284) ==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73) ==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165) ==8804== by 0x4C7128A: thread_routine (thread.cpp:81) ==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so) ==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so) ==8804== Address 0x54171df is 735 bytes inside a block of size 736 free'd ==8804== at 0x4A063F0: free (vg_replace_malloc.c:446) ==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141) ==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83) ==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284) ==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73) ==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165) ==8804== by 0x4C7128A: thread_routine (thread.cpp:81) ==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so) ==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so) ==8804== ==8804== Invalid free() / delete / delete[] / realloc() ==8804== at 0x4A063F0: free (vg_replace_malloc.c:446) ==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141) ==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83) ==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284) ==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73) ==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165) ==8804== by 0x4C7128A: thread_routine (thread.cpp:81) ==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so) ==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so) ==8804== Address 0x5416f00 is 0 bytes inside a block of size 736 free'd ==8804== at 0x4A063F0: free (vg_replace_malloc.c:446) ==8804== by 0x4C5713B: zmq::msg_t::close() (msg.cpp:141) ==8804== by 0x4C781F0: zmq::encoder_base_tzmq::v2_encoder_t::encode(unsigned char, unsigned long) (encoder.hpp:83) ==8804== by 0x4C6ABDA: zmq::stream_engine_t::out_event() (stream_engine.cpp:284) ==8804== by 0x4C526AB: zmq::io_thread_t::in_event() (io_thread.cpp:73) ==8804== by 0x4C51551: zmq::epoll_t::loop() (epoll.cpp:165) ==8804== by 0x4C7128A: thread_routine (thread.cpp:81) ==8804== by 0x3F1AA079D0: start_thread (in /lib64/libpthread-2.12.so) ==8804== by 0x3F1A2E8B7C: clone (in /lib64/libc-2.12.so)
Valgrind out put.
Socket type router dealer. This happens right after ERROR or AGAIN.