System Software-I. Unit 6.
Debugging Tools for Memory Issues.
Valgrind - an instrumentation framework for building dynamic analysis tools.
How to install Valgrind.
Test Valgrind installation.
Using gcc: first, use the Docker image to compile the program.
Test case #0.
Test case #1: Uninitialized memory access.
Test case #5,6: Read overflow on compile-time memory (#5) and on dynamic memory (#6).
Test case #8,9: UAF (use-after-free) (#8) and UAR (use-after-return) (#9).
Test Case #13: Memory leak case #3 - lib API leak.
Valgrind summary table.
Sanitizer toolset.
Building programs for use with ASan.
Running the test cases with ASan. Test case #1: Uninitialized Memory Read.
Test Case #2: write overflow (on compile-time memory).
Test case #3: write overflow (on dynamic memory).
Test Case #8: UAF (use-after-free).
Test case #9: UAR (use-after-return).
AddressSanitizer (ASan) summary table.
A quick comparison between Valgrind and Address Sanitizer.
Glibc mallopt.
Go back to Main Menu
Last Updated 03 Oct, 2020 21:36. <vadimov@i.ua>