From 23d88f76d603f8059e6075a7d8987f449aca3992 Mon Sep 17 00:00:00 2001 From: Fabian Keil Date: Sat, 6 Feb 2021 20:19:10 +0100 Subject: [PATCH] Add configure option to enable MemorySanitizer --- configure.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/configure.in b/configure.in index 6b7f944b..07f2fd9c 100644 --- a/configure.in +++ b/configure.in @@ -168,6 +168,12 @@ if test "x$with_asan" = "xyes"; then LDFLAGS="$LDFLAGS -fsanitize=address" fi +AC_ARG_WITH(asan, [ --with-msan Enable MemorySanitizer. Requires compiler support.]) +if test "x$with_msan" = "xyes"; then + CFLAGS="$CFLAGS -fsanitize=memory" + LDFLAGS="$LDFLAGS -fsanitize=memory" +fi + AC_ARG_WITH(usan, [ --with-usan Enable UndefinedBehaviorSanitizer. Requires compiler support.]) if test "x$with_usan" = "xyes"; then CFLAGS="$CFLAGS -fsanitize=undefined" -- 2.39.2