[libdvbpsi-devel] configure.ac: Add option to use gcc version 4.8.x Adress Sanitizer ( gcc-asan)

Jean-Paul Saman git at videolan.org
Wed Apr 16 15:53:35 CEST 2014


libdvbpsi | branch: master | Jean-Paul Saman <jpsaman at videolan.org> | Tue Apr 15 13:04:29 2014 +0200| [87ed77d832763c0e14800172e67cc19f658b6abb] | committer: Jean-Paul Saman

configure.ac: Add option to use gcc version 4.8.x Adress Sanitizer (gcc-asan)

Beware using the AdressSanitizer from GCC 4.8 uses a lot of memory. You need
more then 8GB of memory in your machine.

> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=87ed77d832763c0e14800172e67cc19f658b6abb
---

 configure.ac |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index c8532f2..2a97e5b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,20 @@ then
   CFLAGS_dist="${CFLAGS_dist} -ggdb3"
 fi
 
+dnl --enable-gcc-sanitize
+dnl NOTE: Only use with more then 8GB of memory in your system
+AC_ARG_ENABLE(gcc-sanitize,
+[  --enable-gcc-sanitize   Use gcc address sanitizer (default disabled)],
+[case "${enableval}" in
+  yes) sanitize=true ;;
+  no)  sanitize=false;;
+  *) AC_MSG_ERROR(bad value ${enableval} for --enable-gcc-sanitize) ;;
+esac],[sanitize=false])
+if test "$sanitize" = "true"
+then
+  CFLAGS_dist="${CFLAG_dist} -fsanitize=address -fno-omit-frame-pointer"
+fi
+
 dnl --enable-release
 AC_ARG_ENABLE(release,
 [  --enable-release        Enable release mode (default disabled)],



More information about the libdvbpsi-devel mailing list