简体   繁体   中英

Treat (some) valgrind warnings as errors?

Is it possible to change some valgrind warnings into errors?

In particular, I want to turn the probably lost warning into an error.

In the valgrind manual I found only information about how to suppress warnings.

Is there a way to do what I want?

Since valgrind release 3.9, you can use the below command line options to better control what leak to reports, and what leaks to consider as errors.

   --show-leak-kinds=kind1,kind2,.. which leak kinds to show?
                                            [definite,possible]
   --errors-for-leak-kinds=kind1,kind2,..  which leak kinds are errors?
                                            [definite,possible]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM