[LLVMdev] Build Failure

dag at cray.com dag at cray.com
Thu Jan 3 10:52:46 PST 2013


David Blaikie <dblaikie at gmail.com> writes:

> The other point Chandler was making, though, was that this sort of fix
> means that other tools (Valgrind/MemSan) won't catch a broader class
> of errors because we will have silenced them too.

Does buildbot do a valgrind build with the same frequency as any other
build?  If so, then either we should fix the warnings or we should
disable them in the Makefile.

> Except it isn't. We can ignore this warning & instead use
> Valgrind-esque tools to catch not only these bugs, but catch & fix
> them better by learning which specific codepath leads to the
> uninitialized use, rather than just initializing a variable to zero
> (or whatever) even in cases where that value was never intended to be
> used in any computation.

So what am I to do?  We build with -Werror.  I am really opposed to
having to sift through hundreds of warning messages to pick out actual
compiler errors.

How about initializing things to a garbage value and then doing an
assert after all the following conditional initialization code runs to
check for the garbage value?  Then even non-valgrind builds will catch
the problem.

                               -David



More information about the llvm-dev mailing list