<p>Pau Espin Pedrol has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/9750">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">configure.ac: Add --enable-sanitize flag<br><br>Change-Id: I83988d90a1dd0a65d84ef990f83e34ac2f588252<br>---<br>M openbsc/configure.ac<br>1 file changed, 15 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/50/9750/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/openbsc/configure.ac b/openbsc/configure.ac</span><br><span>index 2c3045a..f1f6038 100644</span><br><span>--- a/openbsc/configure.ac</span><br><span>+++ b/openbsc/configure.ac</span><br><span>@@ -124,6 +124,18 @@</span><br><span> </span><br><span> dnl Checks for typedefs, structures and compiler characteristics</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+AC_ARG_ENABLE(sanitize,</span><br><span style="color: hsl(120, 100%, 40%);">+  [AS_HELP_STRING(</span><br><span style="color: hsl(120, 100%, 40%);">+              [--enable-sanitize],</span><br><span style="color: hsl(120, 100%, 40%);">+          [Compile with address sanitizer enabled],</span><br><span style="color: hsl(120, 100%, 40%);">+     )],</span><br><span style="color: hsl(120, 100%, 40%);">+   [sanitize=$enableval], [sanitize="no"])</span><br><span style="color: hsl(120, 100%, 40%);">+if test x"$sanitize" = x"yes"</span><br><span style="color: hsl(120, 100%, 40%);">+then</span><br><span style="color: hsl(120, 100%, 40%);">+    CFLAGS="$CFLAGS -fsanitize=address -fsanitize=undefined"</span><br><span style="color: hsl(120, 100%, 40%);">+    CPPFLAGS="$CPPFLAGS -fsanitize=address -fsanitize=undefined"</span><br><span style="color: hsl(120, 100%, 40%);">+fi</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> # The following test is taken from WebKit's webkit.m4</span><br><span> saved_CFLAGS="$CFLAGS"</span><br><span> CFLAGS="$CFLAGS -fvisibility=hidden "</span><br><span>@@ -201,6 +213,9 @@</span><br><span> AC_MSG_RESULT([$enable_ext_tests])</span><br><span> AM_CONDITIONAL(ENABLE_EXT_TESTS, test "x$enable_ext_tests" = "xyes")</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+AC_MSG_RESULT([CFLAGS="$CFLAGS"])</span><br><span style="color: hsl(120, 100%, 40%);">+AC_MSG_RESULT([CPPFLAGS="$CPPFLAGS"])</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> dnl Generate the output</span><br><span> AM_CONFIG_HEADER(bscconfig.h)</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9750">change 9750</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/9750"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: openbsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: I83988d90a1dd0a65d84ef990f83e34ac2f588252 </div>
<div style="display:none"> Gerrit-Change-Number: 9750 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>