3 ms·
Valgrind misses certain problems with stack memory and runs your program with a 10x slowdown. AddressSanitizer and friends use a lot of extra virtual address sp
by slavik81 10y ago
Valgrind misses certain problems with stack memory and runs your program with a 10x slowdown. AddressSanitizer and friends use a lot of extra virtual address space, but run with about a 2x slowdown.
If you're interested in C++ tooling, maybe watch through The Care and Feeding of C++'s Dragons[1] from GoingNative 2013. They start to talk about AddressSanitizer at 55m40s, but the entire thing is really good. The tools they talk about have just gotten even better and more widely available since then.
[1]: https://channel9.msdn.com/Events/GoingNative/2013/The-Care-and-Feeding-of-C-s-Dragons https://channel9.msdn.com/Events/GoingNative/2013/The-Care-a...
- problems 10y agoInteresting, what I'd heard from a colleague is that asan wasn't worth using since it couldn't catch uninitialized memory and stuff. Thanks, I'll have to look into it more.
- slavik81 10y agoThere are different sanitizers for catching different sorts of bugs. MemorySanitizer is the one that catches use of uninitialized memory.
- MaulingMonkey 10y agoAddressSanitizer is part of a suite of tools - MemorySanitizer will catch uninitialized memory, and there is UndefinedBehaviorSanitizer and ThreadSanitizer as well. Your colleague may be complaining that a wrench is not a screwdriver. Address sanitizer has caught something on every codebase I've enabled it on. YMMV, but I encourage you to at least try it out and draw your own conclusions.