[C++] MemorySanitizer

MemorySanitizer is a detector of uninitialized memory reads in C/C++ programs. Uninitialized values occur when stack- or heap-allocated memory is read before it is written. MSan detects cases where such values affect program execution.
At this time, MemorySanitizer supports Linux x86_64 only.
To use MemorySanitizer, compile and link your program with -fsanitize=memory -fPIE -pie. To get any stack traces, add -fno-omit-frame-pointer.

Origins tracking

[C++] AddressSanitizer

AddressSanitizer is a memory error detector for C/C++. It finds:

-Use after free (dangling pointer dereference)
-Heap buffer overflow
-Stack buffer overflow
-Global buffer overflow
-Use after return
-Use after scope
-Initialization order bugs
-Memory leaks

In order to use AddressSanitizer we will need to compile and link your program using clang with the -fsanitize=address switch. To get a reasonable performance add -O1 or higher.

[C++] ThreadSanitizer

ThreadSanitizer is a data race detector for C/C++. Data races are one of the most common and hardest to debug types of bugs in concurrent systems.
Here is an example of a data race that can lead to crashes and memory corruptions:

[C++] How to install gcc-7 on Ubuntu LTS 16.04