@@ -32,9 +32,11 @@
#endif
#if defined(__SANITIZE_ADDRESS__) || __has_feature(address_sanitizer)
+#if HAVE_ASAN_IFACE_H
#define CONFIG_ASAN 1
#include <sanitizer/asan_interface.h>
#endif
+#endif
typedef struct {
Coroutine base;
@@ -5185,6 +5185,13 @@ if compile_prog "" "" ; then
have_utmpx=yes
fi
+##########################################
+# check for asan header
+have_asan_iface_h=yes
+if ! check_include "sanitizer/asan_interface.h" ; then
+ have_asan_iface_h=no
+fi
+
##########################################
# End of CC checks
# After here, no more $cc or $ld runs
@@ -5198,6 +5205,10 @@ elif test "$debug" = "yes"; then
write_c_skeleton;
if compile_prog "-fsanitize=address" ""; then
CFLAGS="-fsanitize=address $CFLAGS"
+ if test "$have_asan_iface_h" = "no" ; then
+ print_error "ASAN build enabled, but ASAN header missing." \
+ "Without code annotation, the report may be inferior."
+ fi
fi
if compile_prog "-fsanitize=undefined" ""; then
CFLAGS="-fsanitize=undefined $CFLAGS"
@@ -6320,6 +6331,10 @@ if test "$have_utmpx" = "yes" ; then
echo "HAVE_UTMPX=y" >> $config_host_mak
fi
+if test "$have_asan_iface_h" = "yes" ; then
+ echo "HAVE_ASAN_IFACE_H=y" >> $config_host_mak
+fi
+
if test "$ivshmem" = "yes" ; then
echo "CONFIG_IVSHMEM=y" >> $config_host_mak
fi
@@ -13,12 +13,13 @@ addons:
- libattr1-dev
- libbrlapi-dev
- libcap-ng-dev
+ - libgcc-6-dev
- libgnutls-dev
- libgtk-3-dev
- libiscsi-dev
- liblttng-ust-dev
- - libnfs-dev
- libncurses5-dev
+ - libnfs-dev
- libnss3-dev
- libpixman-1-dev
- libpng12-dev