'What to use instead of mudflap with gcc/llvm (for detecting memory access bugs)?

It seems that the -fmudflap feature was removed from GCC.

Thus my question: what to use instead of it for dynamically analyzing programs for out-of-bound read/writes, uninitialized reads and such issues?

(and perhaps as a side question: why was it removed?)

The approach of mudflap (instrumentalizing generated code inside the compiler) looks quite elegant.

Background

Other tools instrumentalize on a machine-code level (e.g. Purify), on a source-code level (e.g. Insure) or instrumentalize during the emulation of a CPU (e.g. Valgrind).

The mudflap approach has the potential to find errors which can't be detected by valgrind or purify (e.g. stack based array access errors). It is also more lightweight than other approaches.

I am searching for an open source solution.



Solution 1:[1]

The sanitizers are also quite a bit more advanced in llvm than in gcc as the primary group contributes to llvm and then someone else ports it over to gcc.

http://llvm.org/devmtg/2012-11/#talk4

Has information given by the authors in 2012 on the sanitizers.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 echristo