summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@wdc.com>2018-03-08 13:41:36 -0800
committerBart Van Assche <bart.vanassche@wdc.com>2018-03-15 09:56:43 -0700
commit0ffccc21fcd67d1e1d2a360e90f3fe8efc0d6b52 (patch)
tree029a453d47b40f0cf7d0bfa730738811cff33b12 /configure
parent971caeb177d3bc4f65fa31381bbfb83710bfc690 (diff)
downloadfio-0ffccc21fcd67d1e1d2a360e90f3fe8efc0d6b52.tar.gz
fio-0ffccc21fcd67d1e1d2a360e90f3fe8efc0d6b52.tar.bz2
Improve Valgrind instrumentation of memory allocations
In smalloc, let Valgrind do detection of red zone modifications. In synchr.c, let Valgrind perform use-after-free detection of synchronization objects. Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index f38e9c75..ddf03a6b 100755
--- a/configure
+++ b/configure
@@ -2050,6 +2050,24 @@ fi
print_config "strndup" "$strndup"
##########################################
+# <valgrind/drd.h> probe
+# Note: presence of <valgrind/drd.h> implies that <valgrind/valgrind.h> is
+# also available but not the other way around.
+if test "$valgrind_dev" != "yes" ; then
+ valgrind_dev="no"
+fi
+cat > $TMPC << EOF
+#include <valgrind/drd.h>
+int main(int argc, char **argv)
+{
+ return 0;
+}
+EOF
+if compile_prog "" "" "valgrind_dev"; then
+ valgrind_dev="yes"
+fi
+print_config "Valgrind headers" "$valgrind_dev"
+
# check march=armv8-a+crc+crypto
if test "$march_armv8_a_crc_crypto" != "yes" ; then
march_armv8_a_crc_crypto="no"
@@ -2354,6 +2372,9 @@ fi
if test "$disable_opt" = "yes" ; then
output_sym "CONFIG_DISABLE_OPTIMIZATIONS"
fi
+if test "$valgrind_dev" = "yes"; then
+ output_sym "CONFIG_VALGRIND_DEV"
+fi
if test "$zlib" = "no" ; then
echo "Consider installing zlib-dev (zlib-devel, some fio features depend on it."
if test "$build_static" = "yes"; then