Enable ASAN by default if the compiler supports it. If necessary, we could consider a seperate configure option, although I like the idea to have it enabled by default with --enable-debug, so other people more actively fix errors/warnings, and having less configure options in general.
Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- configure | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/configure b/configure index 2b8c71f522..52d9fd71e5 100755 --- a/configure +++ b/configure @@ -5129,6 +5129,11 @@ elif test "$fortify_source" = "yes" ; then CFLAGS="-O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 $CFLAGS" elif test "$debug" = "no"; then CFLAGS="-O2 $CFLAGS" +elif test "$debug" = "yes"; then + write_c_skeleton; + if compile_prog "-fsanitize=address" ""; then + CFLAGS="-fsanitize=address $CFLAGS" + fi fi ########################################## -- 2.15.1.355.g36791d7216