From: Gabe Black Date: Thu, 26 Mar 2020 10:20:41 +0000 (-0700) Subject: scons: Use the lsan-suppressions file when running internal commands. X-Git-Tag: v20.0.0.0~246 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5a3c0de7e0f24686c6cef9deb5c7b58f44f6eb7;p=gem5.git scons: Use the lsan-suppressions file when running internal commands. These commands (like the marshal binary) might otherwise fail with spurious leaks detected in the python library. Change-Id: I042c2a811d465ac03f005672f328c0fb0b594494 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/27125 Reviewed-by: Nikos Nikoleris Maintainer: Gabe Black Tested-by: kokoro --- diff --git a/SConstruct b/SConstruct index b93a00026..4273d147f 100755 --- a/SConstruct +++ b/SConstruct @@ -510,6 +510,16 @@ if GetOption('with_asan'): # Available for gcc >= 4.8 or llvm >= 3.1 both a requirement # by the build system sanitizers.append('address') + suppressions_file = Dir('util').File('lsan-suppressions').get_abspath() + suppressions_opt = 'suppressions=%s' % suppressions_file + main['ENV']['LSAN_OPTIONS'] = ':'.join([suppressions_opt, + 'print_suppressions=0']) + print() + warning('To suppress false positive leaks, set the LSAN_OPTIONS ' + 'environment variable to "%s" when running gem5' % + suppressions_opt) + warning('LSAN_OPTIONS=suppressions=%s' % suppressions_opt) + print() if sanitizers: sanitizers = ','.join(sanitizers) if main['GCC'] or main['CLANG']: