[asterisk-dev] valgrind errors

Mark Michelson mmichelson at digium.com
Thu Oct 1 09:52:57 CDT 2009


Atis Lezdins wrote:
> On Tue, Sep 29, 2009 at 5:25 PM, Tilghman Lesher <tlesher at digium.com> wrote:
>> On Tuesday 29 September 2009 03:32:41 Benny Amorsen wrote:
>>> Are errors shown by valgrind reason enough to open an asterisk issue?
>>>
>>> With 1.6.0.16rc1 I get various valgrind messages, and I can either post
>>> them here or report them on issues.asterisk.org.
>> That depends upon the nature of the valgrind warnings.  Some of them are
>> normal and not worth a bug report.  For instance, the warnings about the
>> dynamic loader functions are false positives.  Anything about closing non-open
>> file descriptors are also false positives.  However, if you have a bad read
>> (somewhat bad) or a bad write (very bad) in non-codec code, those are worth a
>> look to see if we can do something about them.
>>
> 
> Perhaps it's good to add list of those false-positives to valgrind.txt?
> 
> From Your description, I understand that blocks that contain the
> following should be ignored:
> 
> load_dynamic_module  (loader.c)
> speextolin_framein (codec_speex.c)
> Warning: invalid file descriptor ... in syscall close()
> Warning: invalid file descriptor ... in syscall dup2()
> 
> What about:
> 
> Use --log-fd=<number> to select an alternative log fd.
> 
> I see that repeating quite often in valgrind log.
> 
> Regards,
> Atis
> 

An even better idea would be to create a valgrind suppression file so that those 
warnings don't get printed in the first place.

http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
http://valgrind.org/docs/manual/mc-manual.html#mc-manual.suppfiles

If a .supp file were added to the Asterisk source tree, then the valgrind.txt 
file could be modified to instruct the user to include this suppression file 
when running valgrind.

Mark Michelson



More information about the asterisk-dev mailing list