Commit 23b3340f authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test/common: abort on detected leaks



Most of the AddressSanitizer logs are great in regards
to reported incorrect usage of memory.
Unfortunately LeakSanitizer reports just the leaks.
Having more details how exit of the application happened,
is useful to get a starting point.

For example spdk_perf app has multiple exit()s that
are used at points where no cleanup was done.
Adding abort_on_error will generate a core dump with
a backtrace pointing to the specific exit().

Abort now replaces returning specific exitcode.
It was originally a way to differentiate between
expected exit and ASAN exit. Abort is never expected,
even in NOT() tests, so exitcode is no longer needed.

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: Idc5ea003d0c0860294a564e1ad770471bb35bc42
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/20735


Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarMichal Berger <michal.berger@intel.com>
parent ecfc43be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ export PYTHONDONTWRITEBYTECODE=1

# Export new_delete_type_mismatch to skip the known bug that exists in librados
# https://tracker.ceph.com/issues/24078
export ASAN_OPTIONS=new_delete_type_mismatch=0:disable_coredump=0:exitcode=134:use_sigaltstack=0
export ASAN_OPTIONS=new_delete_type_mismatch=0:disable_coredump=0:abort_on_error=1:use_sigaltstack=0
export UBSAN_OPTIONS='halt_on_error=1:print_stacktrace=1:abort_on_error=1:disable_coredump=0:exitcode=134'

# Export LeakSanitizer option to use suppression file in order to prevent false positives