[gem5-dev] Change in gem5/gem5[develop]: scons: Use the lsan-suppressions file when running internal commands.

2020-03-27 Thread Gabe Black (Gerrit)
Gabe Black has submitted this change. (  
https://gem5-review.googlesource.com/c/public/gem5/+/27125 )


Change subject: scons: Use the lsan-suppressions file when running internal  
commands.

..

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 
---
M SConstruct
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Nikos Nikoleris: Looks good to me, approved
  Gabe Black: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/SConstruct b/SConstruct
index b93a000..4273d14 100755
--- a/SConstruct
+++ b/SConstruct
@@ -510,6 +510,16 @@
 # 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']:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27125
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I042c2a811d465ac03f005672f328c0fb0b594494
Gerrit-Change-Number: 27125
Gerrit-PatchSet: 2
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Bobby R. Bruce 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-Reviewer: Jason Lowe-Power 
Gerrit-Reviewer: Nikos Nikoleris 
Gerrit-Reviewer: kokoro 
Gerrit-CC: Earl Ou 
Gerrit-CC: Jui-min Lee 
Gerrit-CC: Yu-hsin Wang 
Gerrit-MessageType: merged
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

[gem5-dev] Change in gem5/gem5[develop]: scons: Use the lsan-suppressions file when running internal commands.

2020-03-26 Thread Gabe Black (Gerrit)

Hello Gabe Black,

I'd like you to do a code review. Please visit

https://gem5-review.googlesource.com/c/public/gem5/+/27125

to review the following change.


Change subject: scons: Use the lsan-suppressions file when running internal  
commands.

..

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
---
M SConstruct
1 file changed, 10 insertions(+), 0 deletions(-)



diff --git a/SConstruct b/SConstruct
index b93a000..4273d14 100755
--- a/SConstruct
+++ b/SConstruct
@@ -510,6 +510,16 @@
 # 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']:

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/27125
To unsubscribe, or for help writing mail filters, visit  
https://gem5-review.googlesource.com/settings


Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I042c2a811d465ac03f005672f328c0fb0b594494
Gerrit-Change-Number: 27125
Gerrit-PatchSet: 1
Gerrit-Owner: Gabe Black 
Gerrit-Reviewer: Gabe Black 
Gerrit-MessageType: newchange
___
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev