Closed daniel-j-h closed 1 month ago
Playground for Travis setup is here: https://github.com/daniel-j-h/cpp-travis-setup (warning: quite noisy).
This is work in progress, but the following are major accomplishments for enabling this ticket's goals:
This is blocked on Travis CI mainly because of this as of yet unresolved issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=779785
Summary: deb packages do not contain all sanitizer libraries we need, this is known to the maintainer and will hopefully change with time.
We could build from source and cache the results, but this would require great efforts.
The blocking issue seems to be fixed upstream. Cross-referencing @springmeyer's work getting sanitizer builds for tippecanoe working on Travis: https://github.com/mapbox/tippecanoe/pull/224.
Not sure if we want to do this though, as our Travis builds are already really slow.
I'm starting to take a look at this - using clang++ 3.5.
Update: we run the address sanitizer now on Travis:
ubsan and others blocked by not having the capacity on Travis.
This issue seems to be stale. It will be closed in 30 days if no further activity occurs.
This is a proposal to add instrumented binaries to the CI infrastructure, in order to improve code quality and detect hard to find bugs. The idea is as follows: build instrumented binaries, run tests, check reports.
Sanitizers
Here is a quick overview of what we should use:
For using all the sanitizer's features we need a recent Clang or GCC compiler (GCC lacks a few features compared to Clang). Also note that not all sanitizer combinations are allowed or possible, that is we should build separate instrumented binaries for each sanitizer.
Why not Valgrind
Valgrind only provides a subset of what the sanitizers listed above can detect. Running binaries under valgrind is also orders of magnitude slower than using the sanitizers and may not be feasible at all under the CI environemnt constraints.
Please at least skim the slides to the sanitizers presentation linked below.
References: