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 <nikos.nikoleris@arm.com> Maintainer: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
10
SConstruct
10
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']:
|
||||
|
||||
Reference in New Issue
Block a user