Valgrind: disable conditional jump (or whole library) check

六眼飞鱼酱① 提交于 2019-12-05 06:43:43

Valgrind can be configured to suppress errors in libraries.

Details on this you find here: http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress

From the web-page linked above:

Note: By far the easiest way to add suppressions is to use the --gen-suppressions=yes option described in Core Command-line Options. This generates suppressions automatically. For best results, though, you may want to edit the output of --gen-suppressions=yes by hand, in which case it would be advisable to read through this section.

Adding the option

--undef-value-errors=no 

works for me (hide all "Conditional jump or move depends on uninitialised value(s)").

For more information see Valgrind's man page.

Please note that you might also disable warnings generated by your own faulty code if you disable / supress all checks in OpenSSL. For example when you pass not fully initialized structures to OpenSSL functions, this can also result in "conditional jump or move..." errors and you probably want to see those.

You need to compile OpenSSL with the PURIFY flag (-DPURIFY in CFLAGS) to get rid of the errors. Do not use the version compiled that way in your final application, only for debugging purpose, because it decreases the entropy used in various places.

For example, compile OpenSSL in debug mode with :

./config -d no-static shared zlib -Wa,--noexecstack -DPURIFY -O0 -ggdb3
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!