Jeegar Patel
Jeegar Patel

Reputation: 27200

Why do I get an error "...depends on uninitialised value" in valgrind output?

How can I suppress this error in valgrind's output?

==16727== 1 errors in context 2 of 18:
==16727== Conditional jump or move depends on uninitialised value(s)

What causes this error? Can I just ignore it?

Upvotes: 1

Views: 110

Answers (1)

Alok Save
Alok Save

Reputation: 206498

It means that one of your control path is such that an variable/data does not get initialized when that control path gets executed. Unitialized variables usually result in Undefined Behavior So valgrind detects it and reports it.

Have a look at this, It shall help you understand the error.

Also, add the flag --track-origins=yes to valgrind and it will give you information on the sources of uninitialised data.

Upvotes: 3

Related Questions