[CMake] Valgrind fails but ctest doesn't notice

Paul Harris harris.pc at gmail.com
Fri Jun 1 12:56:49 EDT 2012


Hi,

When I run valgrind on a test directly, I see this:

$ valgrind test_array
==30643== Memcheck, a memory error detector
==30643== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==30643== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for
copyright info
==30643== Command: test_array
==30643==
==30643== Conditional jump or move depends on uninitialised value(s)
==30643==    at 0x402291: test_misc (in test_array)
==30643==    by 0x404A53: run_tests (in test_array)
==30643==    by 0x402257: main (in test_array)
==30643==
==30643==
==30643== HEAP SUMMARY:
==30643==     in use at exit: 0 bytes in 0 blocks
==30643==   total heap usage: 70 allocs, 70 frees, 6,647 bytes allocated
==30643==
==30643== All heap blocks were freed -- no leaks are possible
==30643==
==30643== For counts of detected and suppressed errors, rerun with: -v
==30643== Use --track-origins=yes to see where uninitialised values come
from
==30643== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 4 from 4)


(note the bug I put in on purpose)

When ctest runs, it just says "passed".

Surely it should flag a problem?  What am I doing wrong?

thanks,
Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120602/fe37a9da/attachment.htm>


More information about the CMake mailing list