Re: Question regarding 'Conditional jump or move depends on uninitialised value(s)'

Thomas Wollenzin <[email protected]> Mon, 17 Jun 2024 07:11:53 +0000
Newsgroups gmane.comp.debugging.valgrind
Message-ID <PAVPR10MB74659087A28CC48E47EE918389CD2@PAVPR10MB7465.EURPRD10.PROD.OUTLOOK.COM>
This indeed seems very useful. Thanks for making me aware of this tool, John.

Cheers,
Thomas

________________________________
From: John Reiser <[email protected]>
Sent: Sunday, June 16, 2024 10:03 PM
To: [email protected] <[email protected]>
Subject: Re: [Valgrind-users] Question regarding 'Conditional jump or move depends on uninitialised value(s)'

> 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.

The "ultimate hammer" or "magic wand" is 'rr', which is
"Record and Replay".  By using it you can execute *backwards*,
that is "back up" from the point of error to as far back
as you want, examining memory as you go; or even setting
breakpoints or watchpoints to see when (in the past!) state changed.
See  https://rr-project.org ; also search the 'net for
"rr record replay".

You'll have to learn this new style of debugging,
and you will need a lot of disk space: 100GB is typical.
But you *will* find the bug!


_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users