diff --git a/lib/env_dpdk/init.c b/lib/env_dpdk/init.c index 948d98105c..c3ceff29af 100644 --- a/lib/env_dpdk/init.c +++ b/lib/env_dpdk/init.c @@ -280,8 +280,13 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts) return -1; } - /* set the base virtual address */ - args = spdk_push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x1000000000")); + /* Set the base virtual address - it must be an address that is not in the + * ASAN shadow region, otherwise ASAN-enabled builds will ignore the + * mmap hint. + * + * Ref: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm + */ + args = spdk_push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x200000000000")); if (args == NULL) { return -1; } diff --git a/test/common/autotest_common.sh b/test/common/autotest_common.sh index 252a20bf8d..d534c0cb6a 100755 --- a/test/common/autotest_common.sh +++ b/test/common/autotest_common.sh @@ -367,9 +367,8 @@ function rbd_cleanup() { function start_stub() { # Disable ASLR for multi-process testing. SPDK does support using DPDK multi-process, - # but ASAN instrumentation will result in mmap hints in our specified virt address - # region getting ignored. We will reenable it again after multi-process testing - # is complete in kill_stub() + # but ASLR can still be unreliable in some cases. + # We will reenable it again after multi-process testing is complete in kill_stub() echo 0 > /proc/sys/kernel/randomize_va_space $rootdir/test/app/stub/stub $1 & stubpid=$!