Project

General

Profile

Actions

Task #3852

open

Ability to build with sanitizers

Added by Roland Fischer over 4 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Target version:
Effort:
Difficulty:
Label:

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.

Actions #1

Updated by Roland Fischer over 4 years ago

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.

Actions #2

Updated by Philippe Antoine over 3 years ago

Why would you like them in configure instead of CFLAGS ?

Actions #3

Updated by Roland Fischer over 3 years ago

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.

Actions #4

Updated by Philippe Antoine 5 months ago

  • Target version set to TBD
Actions

Also available in: Atom PDF