Thanks for the reply Nick.

I do have --track-origins=yes enabled, always. This way I know where the object 
in question is allocated and where the uninitialized access occurs. It's still 
insufficient unfortunately as it doesn't reveal the exact involved actors.

Thanks,
Thomas

________________________________
From: Nicholas Nethercote <n.netherc...@gmail.com>
Sent: Sunday, June 16, 2024 1:13 AM
To: Thomas Wollenzin <wolle...@msn.com>
Cc: valgrind-users@lists.sourceforge.net <valgrind-users@lists.sourceforge.net>
Subject: Re: [Valgrind-users] Question regarding 'Conditional jump or move 
depends on uninitialised value(s)'

Hi,

Re-run with the --track-origins=yes flag enabled and it will give you more 
detail about where the uninitialized value comes from. (That option isn't on by 
default because it makes Valgrind run more slowly.)

Nick

On Sun, 16 Jun 2024 at 06:13, Thomas Wollenzin 
<wolle...@msn.com<mailto:wolle...@msn.com>> wrote:
Hi,

I'm not too familiar with valgrind yet so excuse a potentially dumb question.

I'm trying to fix an issue in our code base that valgrind reported as 
'Conditional jump or move depends on uninitialised value(s)'. In particular I 
have a hard time understanding what the exact item is that's being seen as 
uninitialised. I can't share code as it's very complex and non-public.

What happens is that a rather large class is allocated via operator new which 
comes with tons of subsequent data. Unfortunately, a lot of that data isn't 
default initialized so it's rather impossible to go by trial and error. 
Valgrind does report the place where the condition is but it's a super busy 
loop that works on tons of templated data.

Is there a way to have Valgrind tell me what type exactly has the uninitialised 
field or at best break at the time this exact incident occurs?

Thanks,
Thomas

_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net<mailto:Valgrind-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/valgrind-users
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to