Valgrind continues to complain about uninitialized bytes and truncate in search of a minimal example. I ended up with this:
#include <valgrind/memcheck.h> struct dummyObject{ int foo; bool bar; dummyObject():foo(1),bar(true) {} }; int main(){ dummyObject dummy; VALGRIND_CHECK_VALUE_IS_DEFINED(dummy); return 0; }
Having two ints or two bools, or one int or bool, does not cause any complaints. It seems that having a class with members of different types leads to a Valgrind complaint. This is not only related to my explicit request for verification; in a larger program that uses an object similar to dummyObject, I get the error "Conditional jump or move depends on the error of an uninitialized value".
My compiler is g ++ 4.7.3 on 64-bit Linux, compiling with debug flags and without optimization - or with, it does not matter.
Is there something I am missing or is it a false positive?
source share