make: Add an option to compile with address sanitizer#2285
Conversation
|
Concept ACK What ASAN runtime errors have you observed when running the tests? Perhaps we should add a suppressions file in order to be able to guard against new ones using a Travis ASAN job? FWIW I managed to get the project to build under Clang 7's ASAN. Which Clang version did you test against? From a |
|
I'm using clang v6.0.0, so maybe they addressed it recently?
I think they should be exclusive, yes. I'll amend to error out in case both are configured
I haven't observed any, which is motivating. I had to turn off at-exit leak detection though since there seems to be something there, but couldn't figure out what. |
Currently only works with `gcc` due to google/sanitizers#1028, so configure makes sure we warn if clang with ASAN is attempted. According to [my benchmarks][benchmarks] the performance degradation is small enough to have it active always. [benchmarks]: #2277 (comment) Signed-off-by: Christian Decker <decker.christian@gmail.com>
|
Ping @rustyrussell |
Currently only works with
gccdue to google/sanitizers#1028, soconfigure makes sure we warn if clang with ASAN is attempted.
According to my benchmarks the performance degradation
is small enough to have it active always.
Would be nice to eventually get
clangworking as well, since it has some additional sanitizers, such as the memory sanitizer which guards uninitialized values.Fixes #2277
Signed-off-by: Christian Decker decker.christian@gmail.com