30.09.2013, 03:15, "Lu Mitnick" <king19880...@gmail.com>: > 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 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users