Re: Suspect "uninitialised value(s)" error

Paul Floyd <[email protected]> Thu, 12 Oct 2023 10:16:17 +0200
Newsgroups gmane.comp.debugging.valgrind
Message-ID <[email protected]>
On 12/10/2023 10:06, Tom Hughes wrote:
>
> That's not any part of the problem code though, so it's not
> really relevant to the original problem.
>
> There's no way we can comment on the original problem though
> because we can't actually see any of the code, only a few top
> level highlights which is nowhere near enough to tell us
> anything about what is happening.


Yes, a lot of users tend to be confused in thinking that once an object 
has been initialized then it will always be initialized.

We can't see when is happening between the possibly incomplete 
initialization and the actual error.


Just to explain that first point, in pseudo code

Uninit x; // not initialized

Widget w;

memset w to 0;

// w now all initialized

w.thing = x;

// w.thing now uninitialized


A+

Paul