From: Aaron B. <bo...@gm...> - 2021-01-07 19:46:53
|
On Thu, Jan 7, 2021 at 2:29 PM Tom Hughes <to...@co...> wrote: > On 07/01/2021 19:15, Aaron Boxer wrote: > > > I am hunting for an uninitialized memory issue. I have integrated > > valgrind into my code, using cmake find_package, but when I call > > |VALGRIND_CHECK_MEM_IS_DEFINED| it always returns 0 no matter what I > > pass in. For example |VALGRIND_CHECK_MEM_IS_DEFINED(0x00,0xFFFFFF)| > > returns zero. > > > > Am I missing something ? > > Well address zero is likely uninitialised so you would expect it to > return zero as that is the address of the first uninitialised byte in > the block - obviously that is unhelpful because it's the same response > as if the whole block was defined but real systems will never use > address zero for anything. > Thanks, Tom! Problem turned out to be me not RTFM ing. I was not running under valgrind. Cheers, Aaron |