I am getting many errors with valgrind saying "Conditional jump or move depends on uninitialized value(s)".
Below is the one of the blocks. All of them are similar:
vasm_sourceline_info_t* line = asmState->firstLine;
if (line == NULL) return;
while ((line = line->next) != NULL)
{
printf ("[%s(%i)] %s\n", line->fileName, line->lineNumber, line->data);
}
The error itself is on the while() line. vasm_sourceline_info
is a doubly linked list structure. The code ~works~ but this error is worrying. Is there something else in code stomping on memory, or is the above function flawed in some way?
Compile with optimizations OFF (-O0
). Run valgrind with --track-origins=yes
to determine the source of the errors. See here for more.
There's nothing wrong with the code per se, but if one of the lines' next
field has not been initialized (presumably the last line's next
field), that would explain the message.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With