Always include frame pointers with address sanitizer

This is needed to get proper stack traces with the sanitizer.
This commit is contained in:
Pierre Ossman 2018-07-02 13:39:39 +02:00
parent 5278291a82
commit daaa48108a

View File

@ -56,7 +56,7 @@ AC_ARG_ENABLE([address-sanitizer], AS_HELP_STRING([--enable-address-sanitizer],
[enable AddressSanitizer support for detecting a wide variety of \
memory allocation and deallocation errors]), \
[AC_DEFINE(HAVE_ADDRESS_SANITIZER, 1, [enable AddressSanitizer])
CFLAGS="$CFLAGS -fsanitize=address"
CFLAGS="$CFLAGS -fsanitize=address -fno-omit-frame-pointer"
AC_TRY_COMPILE([],[const int i=0;],[AC_MSG_NOTICE([Address Sanitizer Enabled])],
[AC_MSG_ERROR([Address Sanitizer not available])])
])