Change in osmo-sip-connector[master]: configure.ac: add --enable-sanitize

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
Mon Nov 5 04:15:29 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/11592


Change subject: configure.ac: add --enable-sanitize
......................................................................

configure.ac: add --enable-sanitize

Add --enable-sanitize to ./configure, as a copy-paste from libosmocore.

When building libosmocore with --enable-sanitize, osmo-sip-connector cannot be
linked if it doesn't include asan as well.

This is particularly annoying to me when using sanitize.opts in osmo-dev. I'd
have to turn off *all* asan everywhere just to include the osmo-sip-connector
dep that was recently added.

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



  git pull ssh://gerrit.osmocom.org:29418/osmo-sip-connector refs/changes/92/11592/1

diff --git a/configure.ac b/configure.ac
index 98fdc94..cdb42a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -27,6 +27,18 @@
 PKG_CHECK_MODULES(LIBOSMOVTY, libosmovty >= 0.11.0)
 PKG_CHECK_MODULES(SOFIASIP, sofia-sip-ua-glib >= 1.12.0)
 
+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
+
 AC_ARG_ENABLE(werror,
 	[AS_HELP_STRING(
 		[--enable-werror],

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

Gerrit-Project: osmo-sip-connector
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I18761802db2f29d9f0c7f269197d5b5e191142c5
Gerrit-Change-Number: 11592
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181105/77515cb6/attachment.htm>


More information about the gerrit-log mailing list