[erlang-questions] Help find bugs before OTP-18.0 is released

Tuncer Ayaz tuncer.ayaz@REDACTED
Tue Sep 23 22:59:04 CEST 2014


Now that the --enable-sanitizers patch has been merged, it would be
great if more users could test their code with an OTP install built
with one or more sanitizers enabled in a dev/test environment. To be
clear, it's _not_ a good idea to use in a production node.

So far using only UBSan (undefined behavior sanitizer), we already
found a couple bugs in the VM, and there's still time to find and fix
more issues before OTP-18.0.

The way sanitizers work is that the generated code is instrumented to
find bugs at runtime. Basically, such an Erlang/OTP install will print
what condition it encountered and possibly terminate.

If you're interested and are using gcc >= 4.8 or clang >= 3.3, just
make sure to enable it during ./configure as follows:

# enable only undefined behavior sanitizer
$ ./configure <your_usual_flags> --enable-sanitizers=undefined

# enable both address sanitizer and undefined behavior sanitizer
$ ./configure <your_usual_flags> --enable-sanitizers

# enable just address sanitizer
$ ./configure <your_usual_flags> --enable-sanitizers=address

There are heavier and more specific sanitizers you can enable, and if
you'd like to learn more, see the following links:
http://clang.llvm.org/docs/UsersManual.html#controlling-code-generation
https://code.google.com/p/address-sanitizer/
http://clang.llvm.org/docs/AddressSanitizer.html
https://code.google.com/p/thread-sanitizer/
http://clang.llvm.org/docs/ThreadSanitizer.html



More information about the erlang-questions mailing list