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

John Reiser <[email protected]> Sun, 16 Jun 2024 13:03:56 -0700
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
> 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!