|
From: Nicholas N. <nj...@cs...> - 2006-08-07 23:17:43
|
On Mon, 7 Aug 2006, David Greene wrote:
> I have a simple question that doesn't seem to be addressed
> anywhere.
>
> When I get a " Conditional jump or move depends on uninitialised
> value(s)" error, how do I know which variable is uninitialized.
> For example, my code could be:
>
> if (a || b || c) { ... }
>
> How do I know whether the uninitialized value is a, b or c?
You have to either temporarily split the condition over multiple lines, or
temporarily use the client request VALGRIND_CHECK_VALUE_IS_DEFINED.
> Printing the address of the uninitialized data for this and
> other such errors would be tremendously useful.
Unfortunately the value is usually in a register when the problem is
detected.
Nick
|