DUE TO SPAM, SIGN-UP IS DISABLED. Goto Selfserve wiki signup and request an account.
...
The capabilities of ASAN are similar whether the compiler used is clang or g++, as long as you're using very recent version of the compilers. There's a good comparison of clang versus gcc7, in terms of ASAN capabilities, here. With MXNet we've tested various versions of compilers and found that clang does not work well with our library. We haven't completely tracked down the issue, but trying various methods of enabling ASAN has not worked for us when using clang, including forcing clang to dynamically link the ASAN library. Luckily GCC ASAN seems to work correctly, and GCC 8 has the ASAN capabilities that we'd like to use. Because of this we recommend using GCC 8 w/ ASAN when attempting to detect leaks or buffer overflows in MXNet, and we use GCC8 in CI and the Dockerfiles referred to below.
ASAN versus Valgrind
ASAN is often compared to Valgrind. Both perform similar actions and test for similar failures. There are several differences, but one major one is that ASAN works by instrumenting the during compilation, Valgrind works by instrumenting binaries after compilation. This design choice allows ASAN to run much faster than Valgrind, which makes it easier to run real world use cases. Sanitizers also have better multithreading support. ASAN also has wide community adoption, and several large technology communities are actively contributing to ASAN. One disadvantage to ASAN is that it's a relatively new tool compared to Valgrind, because of this it's best to use as up-to-date a version of ASAN as possible.
ASAN in CI
We're currently experimenting with a variety of methods for incorporating automatic ASAN checks in our CI system. We will likely run these checks per-PR request while the detection is under active development. We'll likely migrate the checks to nightly builds to reduce cost once the development is stable. Thus far we've only enabled one variant of MXNet's build type, a basic CPU build. We hope this will serve a basis for other developers to integrate ASAN with other MXNet build flavours.
...