valgrind and electric fence

Matthias Andree matthias.andree at gmx.de
Thu Jan 9 15:03:03 CET 2003


On Thu, 09 Jan 2003, David Relson wrote:

> I see you've added "$VAL" to several of the regression test scripts.  Why 
> not add control lines (but comment them out)?  or else create a 
> README.testing file for doc/programmer?  For my own ease of use, I'm 
> creating a memcheck.sh script with the two lines, i.e.
> 
> #!/bin/sh
> env VAL="ef" make check
> env VAL="valgrind --num-callers=32" make check

That's insufficient. You need to run ef twice, once without
EF_PROTECT_BELOW, once with EF_PROTECT_BELOW=1, and I also recommend
EF_ALLOW_MALLOC_0=1, EF_FILL=85 and EF_PROTECT_FREE=1.

So your memcheck.sh is likely:

#!/bin/sh
env VAL="ef" EF_ALLOW_MALLOC_0=1 EF_FILL=85 \
    EF_PROTECT_FREE=1 EF_PROTECT_BELOW=1 \
    make check
env VAL="ef" EF_ALLOW_MALLOC_0=1 EF_FILL=85 \
    EF_PROTECT_FREE=1 make check
env VAL="valgrind --num-callers=32" make check

Feel free to commit that to the source tree into tests/

-- 
Matthias Andree




More information about the bogofilter-dev mailing list