|
From: Konstantin T. <an...@ya...> - 2013-09-30 10:49:44
|
30.09.2013, 03:15, "Lu Mitnick" <kin...@gm...>: > Hello all, > > Memcheck could be used to detect different type of bugs: > 1. illegal read/write > 2. use of uninitialised values > 3. illegal frees > 4. when a heap block is freed with an inappropriate deallocation function > ... > > I am wondering whether it is possible to use valgrind to check specified bug types? In other words, I would like to use memcheck to only check addressable bug, illegal frees bug and allocation/deallocation routine mismatched bug in the first run. Then check the use of uninitialised values bug in the second run. > > Thanks a lot. You can use AddressSanitizer (clang 3.0+ or gcc 4.8+) for the first run. As a bonus point it does not cause so heavy slowdown as valgrind and provides more verbose info for bugs like use after free (trace when it was allocated, when it was deleted, and when it was used, while memcheck shows only the last one). -- Regards, Konstantin |