Re: Integrating Valgrind into code

Aaron Boxer <[email protected]>
Newsgroups gmane.comp.debugging.valgrind
Message-ID <CAK8GPyAJLHyUK_iTpHKoQ0M4ZdpB6YH3hYuxeWN+MD80c6kctw@mail.gmail.com>
On Thu, Jan 7, 2021 at 2:29 PM Tom Hughes <[email protected]> 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

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users
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.