From 7a21494f3913142885c0744e18443f8528105d3d Mon Sep 17 00:00:00 2001 From: Michael Rash Date: Tue, 7 Apr 2015 16:32:44 -0700 Subject: [PATCH] added --enable-asan-support for Google's Address Sanitizer compiler flags --- ChangeLog | 3 +++ configure.ac | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4ff89420..28f18c5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,9 @@ fwknop-2.6.6 (02//2015): - [test suite] Handle versions of lcov that don't have the --rc argument which is normally used to force the creation branch coverage stats when code coverage reports are created. + - [build] Add --enable-asan-support to autoconf configure script to enable + Google's Address Sanitizer (ASan) support. This feature is used during + the testing phase for new fwknop releases. fwknop-2.6.5 (12/16/2014): - [server] (Grant Pannell) Added a new access.conf variable "DESTINATION" diff --git a/configure.ac b/configure.ac index 8fadbfb1..ca1b4fa1 100644 --- a/configure.ac +++ b/configure.ac @@ -170,6 +170,19 @@ fi AM_CONDITIONAL([WANT_C_UNIT_TESTS], [test "$want_c_unit_tests" = yes]) +dnl Decide whether or not to enable address sanitizer support +dnl +want_asan_support=no +AC_ARG_ENABLE([asan-support], + [AS_HELP_STRING([--enable-asan-support], + [Build fwknop binaries with address sanitizer support @<:@default is to disable@:>@])], + [want_asan_support=$enableval], + []) + +if test "x$want_asan_support" = "xyes"; then + FKO_CHECK_COMPILER_ARG([-fsanitize=address -fno-omit-frame-pointer]) +fi + dnl Decide whether or not to compile in certain features that enable fuzzing dnl of fwknop code - this is for testing purposes only. dnl