Change in openbsc[master]: configure.ac: Add --enable-sanitize flag

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/.

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Wed Jun 27 11:44:59 UTC 2018


Pau Espin Pedrol has uploaded this change for review. ( https://gerrit.osmocom.org/9750


Change subject: configure.ac: Add --enable-sanitize flag
......................................................................

configure.ac: Add --enable-sanitize flag

Change-Id: I83988d90a1dd0a65d84ef990f83e34ac2f588252
---
M openbsc/configure.ac
1 file changed, 15 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/9750/1

diff --git a/openbsc/configure.ac b/openbsc/configure.ac
index 2c3045a..f1f6038 100644
--- a/openbsc/configure.ac
+++ b/openbsc/configure.ac
@@ -124,6 +124,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 "
@@ -201,6 +213,9 @@
 AC_MSG_RESULT([$enable_ext_tests])
 AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")
 
+AC_MSG_RESULT([CFLAGS="$CFLAGS"])
+AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])
+
 dnl Generate the output
 AM_CONFIG_HEADER(bscconfig.h)
 

-- 
To view, visit https://gerrit.osmocom.org/9750
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I83988d90a1dd0a65d84ef990f83e34ac2f588252
Gerrit-Change-Number: 9750
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180627/b42c6a85/attachment.htm>


More information about the gerrit-log mailing list