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 <gabebl...@google.com>
Gerrit-Reviewer: Gabe Black <gabe.bl...@gmail.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to