-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AddressSanitizerComparisonOfMemoryTools
Alexander Potapenko edited this page Aug 31, 2015
·
12 revisions
AddressSanitizer | Valgrind/Memcheck | Dr. Memory | Mudflap | Guard Page | gperftools | |
---|---|---|---|---|---|---|
technology | CTI | DBI | DBI | CTI | Library | Library |
ARCH | x86,ARM,PPC,... | x86,ARM,PPC | x86 | all(?) | all(?) | all(?) |
OS | Linux, Mac, Windows, FreeBSD, Android | Linux, Mac | Windows, Linux | Linux, Mac(?) | All (1) | Linux, Windows |
Slowdown | 2x | 20x | 10x | 2x-40x | ? | ? |
Detects: | ||||||
Heap OOB | yes | yes | yes | yes | some | some |
Stack OOB | yes | no | no | some | no | no |
Global OOB | yes | no | no | ? | no | no |
UAF | yes | yes | yes | yes | yes | yes |
UAR | yes (see AddressSanitizerUseAfterReturn) | no | no | no | no | no |
UMR | no (see MemorySanitizer) | yes | yes | ? | no | no |
Leaks | yes (see LeakSanitizer) | yes | yes | ? | no | yes |
DBI: dynamic binary instrumentation
<BR>
CTI: compile-time instrumentation
<BR>
UMR: uninitialized memory reads
<BR>
UAF: use-after-free (aka dangling pointer)
<BR>
UAR: use-after-return
<BR>
OOB: out-of-bounds
<BR>
x86: includes 32- and 64-bit.
<BR>
Guard Page: a family of memory error detectors (Electric fence or DUMA on Linux, Page Heap on Windows, Guard Malloc in Mac) gperftools: various performance tools/error detectors bundled with TCMalloc. Heap checker (leak detector) is only available on Linux. Debug allocator provides both guard pages and canary values for more precise detection of OOB writes, so it's better than guard page-only detectors.
- AddressSanitizer: see AddressSanitizerPerformanceNumbers
- Valgrind/Memcheck and Dr. Memory: see Dr. Memory paper
- Mudflap: slowdown varies from 2x to 40x
- Guard Page: 2/3 cpu2006 benchmarks fail (tested using DUMA on a Linux box with 24G RAM)