[zeromq-dev] ZMQ_MAKE_VALGRIND_HAPPY
Pieter Hintjens
ph at imatix.com
Tue Apr 26 09:24:19 CEST 2011
On Tue, Apr 26, 2011 at 8:33 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:
>> Rationale: In debug mode, efficiency is not so important. But we want to
>> have the possibility to run valgrind etc. - In release mode, there is no
>> need to debug anyway. (Additionally, valgrind would in any case output
>> kinda weird results in an optimized build)
>
> Makes sense IMO.
>
> Mikko, is it possible to set ZMQ_MAKE_VALGRIND_HAPPY when --enable-debug
> is set?
This is an excellent idea, it's what I was asking for before we
started working on a suppression file.
Would it not make more sense to use something like "#ifdef DEBUG"
rather than the VALGRIND specific macro, since the same initialization
is necessary for other memory checking tools.
And also:
- debug is not enabled by default, IMO that should be done for all
except stable releases
- as far as I can tell there's only a single point in libzmq that
actually needs this macro (the send method), most of the conditionals
may be unnecessary
- there's no DEBUG macro defined yet when debug is enabled
-Pieter
More information about the zeromq-dev
mailing list