Wireshark-dev: Re: [Wireshark-dev] Canaries in Wmem
From: Gerald Combs <gerald@xxxxxxxxxxxxx>
Date: Tue, 08 Jan 2013 15:45:14 -0800
On 12/21/12 12:05 PM, Jeff Morriss wrote:
> Evan Huus wrote:
>>
>> fuzz-test.sh has a -g flag that does exactly this. Is it possible to
>> enable that flag on the fuzz-bot or would that kill performance too
>> much?
> 
> My experience with Valgrind is that it is *many* times slower.  But I
> guess if it is more likely to detect every memory problem it might not
> matter.
> 
> But, at least in taking a quick look at that "-g" flag, the bot would
> also need a way to declare failure (so it would know when to raise a bug).

We recently received two gently used servers to help spread the Buildbot
load so running Valgrind should no longer be a problem. Earlier today I
moved the Clang-Code-Analysis VM to one of new servers and I'm in the
process of adding a build step which runs a single Valgrind pass.
Unfortunately it's failing on the first file. We may need to add a
suppression file to the tools directory:

==23585== Conditional jump or move depends on uninitialised value(s)
==23585==    at 0x99864E0: inflateReset2 (in
/lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==23585==    by 0x99865D8: inflateInit2_ (in
/lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==23585==    by 0x4E4746D: file_fdopen (file_wrappers.c:842)
==23585==    by 0x4E47521: file_open (file_wrappers.c:879)
==23585==    by 0x4E450E0: wtap_open_offline (file_access.c:325)
==23585==    by 0x41AE84: cf_open (tshark.c:3619)
==23585==    by 0x40D6D9: main (tshark.c:1826)
==23585==
==23585==
==23585== HEAP SUMMARY:
==23585==     in use at exit: 5,101,343 bytes in 93,868 blocks
==23585==   total heap usage: 406,297 allocs, 312,429 frees, 36,425,645
bytes allocated
==23585==
==23585== LEAK SUMMARY:
==23585==    definitely lost: 524,963 bytes in 475 blocks
==23585==    indirectly lost: 225,050 bytes in 8,149 blocks
==23585==      possibly lost: 4,000 bytes in 1 blocks
==23585==    still reachable: 4,347,330 bytes in 85,243 blocks
==23585==         suppressed: 0 bytes in 0 blocks
==23585== Rerun with --leak-check=full to see details of leaked memory
==23585==
==23585== For counts of detected and suppressed errors, rerun with: -v
==23585== Use --track-origins=yes to see where uninitialised values come
from
==23585== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2)