[PATCH] osmo-bsc[master]: add --enable-sanitize config option

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Fri Nov 17 02:35:59 UTC 2017


Review at  https://gerrit.osmocom.org/4885

add --enable-sanitize config option

Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b
---
M configure.ac
1 file changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/85/4885/1

diff --git a/configure.ac b/configure.ac
index f741441..a66ed26 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,6 +70,18 @@
 
 dnl Checks for typedefs, structures and compiler characteristics
 
+AC_ARG_ENABLE(sanitize,
+	[AS_HELP_STRING(
+		[--enable-sanitize],
+		[Compile with address sanitizer enabled],
+	)],
+	[sanitize=$enableval], [sanitize="no"])
+if test x"$sanitize" = x"yes"
+then
+	CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"
+	CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"
+fi
+
 # The following test is taken from WebKit's webkit.m4
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fvisibility=hidden "

-- 
To view, visit https://gerrit.osmocom.org/4885
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6888cc29b9815d3dc7aa6673599a0d6cb010e6b
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list