Code & Execution Analysis Tools
Analysis Tools

Sanitizers

ASAN (Address Sanitizer)

  • g++ -fsanitize=address
  • clang++ -fsanitize=address
  • MSVC (as of 10/2019)

UBSAN (Undefined Behavior Sanitizer)

  • g++ -fsanitize=undefined
  • clang++ -fsanitize=undefined

LeakSanitizer

  • g++ -fsanitize=leak
  • clang++ -fsanitize=leak

ThreadSanitizer

  • g++ -fsanitize=thread
  • clang++ -fsanitize=thread

Stand-Alone Analysis Tools
Stand-Alone Tools

valgrind

  • WSL
  • code instrumentation framework
  • runs program on a VM
  • --tool=memcheck leak, invalid read/write detection
  • --tool=callgrind runtime profiling
  • --tool=cachegrind cache profiling
  • --tool=massif heap memory profiling
  • integration into various IDEs

Dr. Memory

  • dynamic instrumentation (runs on unmodified binaries)
  • leak detection
  • invalid memory read/write detection

HeapTrack

  • heap memory profiler
  • annotation of memory allocations

Application Verifier

Deleaker

  • memory leak detection
  • integration into various IDEs