开发者

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 er开发者_C百科ror? Can I just ignore it?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜