Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

MemorySanitizer (MSan) is a detector of uninitialized memory reads in C/C++ programs.

Code Block
languagecpp
themeEmacs
titleuninit-mem.c
int main() {
    int x;
    return x;
}


Code Block
languagebash
themeEmacs
titleMemory Sanitizer
==247==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x495056 in main (/mnt/c/Users/Pascal/netdef/a.out+0x495056)
    #1 0x7f43b7ed10b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #2 0x41c26d in _start (/mnt/c/Users/Pascal/netdef/a.out+0x41c26d)

SUMMARY: MemorySanitizer: use-of-uninitialized-value (/mnt/c/Users/Pascal/netdef/a.out+0x495056) in main

...