In this post, I will provide comparison on
various memory tools I tried so far - Valgrind's memcheck, AddressSanitizer, MALLOC_CHECK_. The tests I tried on different tools is
located at https://github.com/babuneelam/valgrind_tests/blob/master/vg_tests.c
Here is the comparison chart.
Valgrind’s memcheck
|
ASAN
|
MALLOC_CHECK_
|
|
uninitialized use
|
✓
|
||
Read/Write after free
|
✓
|
||
buffer overrun
|
✓
|
✓
|
✓
|
Read/Write bad stack
location (underrun)
|
✓
|
||
Memory Leak
|
✓
|
||
c++related test
(ignore this)
|
✓
|
||
Overlapping memcpy
|
✓
|
||
double free
|
✓
|
✓
|
✓
|
Read/Write invalid
stack location (overrun)
|
✓
|
||
Read/Write invalid
global data location (overrun)
|
|||
Performance hit
|
10-30x
|
?
|
?
|
Hope this helps.
No comments:
Post a Comment