capnproto
capnproto copied to clipboard
Run various Clang analysis as part of release-gating tests
Currently, our release tests automatically run valgrind to detect memory errors, but there are other analyzers we could be using too. Clang in particular offers the following options:
- Static Analyzer: I ran this and it reported no errors on the first try. I expected some false positives at least, so need to investigate.
- Address Sanitizer: I ran this and it caught one (probably not serious) bug! 2825abe227786ac3ed36c16edeb4558740e82ca9
- Memory Sanitizer: This seems to do something similar to Valgrind, except that it requires instrumented code. Unfortunately it requires that all code is instrumented including libraries. It appears to be a rather involved process to build an instrumented libc++, though I found this guide.
- Undefined Behavior Sanitizer: This seems to fire a bunch of false positives currently. We could probably eliminate them, though, and then require that this run cleanly.
- Control Flow Integrity Sanitizer: This looks possibly interesting but looks pretty involved to set up.
We should extend super-test.sh to cover all of these.