Re: Integrating Valgrind into code

Tom Hughes via Valgrind-users <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
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.

Tom

-- 
Tom Hughes ([email protected])
http://compton.nu/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.