Task #3852
open
Ability to build with sanitizers
Added by Roland Fischer over 4 years ago.
Updated 4 months ago.
Description
While one can inject building with the different sanitizers easily from the outside through CFLAGS and LDFLAGS, I would recommend to add them to the configure script for easier usage so that one can e.g. call configure --enable-address-sanitizer
or if you like it shorter configure --enable-asan
Recommend to start with the main sanitizers supported by both gcc and clang: asan, ubsan, tsan.
This is only about adding the configure capability. There probably should be a follow-on discussion on whether some testing should be run with asan by default, etc.
Why would you like them in configure instead of CFLAGS ?
Personal preference to set compilation features through the configure/build system, not the environment.
I find that approach also more useful when e.g. having to combine separate features. Easier to explain than "do those through CFLAGS, those in CXXFLAGS, those in LDFLAGS, the others through configure/autoconf". Having said that, it does not matter much if it's documented.
On a personal note, due to historical/hysterical reasons, been in more than one project with non-repeatable builds due to accidental automatic pickup of C/CXX/LDFLAGS or other env vars so personally try to avoid any environment variables to change build behaviour. I don't say this is an issue with Suricata builds at all, just providing background info on my personal preference ;)
There's a discussion to be had whether this proposed change is worthwhile to do or not.
- Target version set to TBD
Also available in: Atom
PDF