diff options
author | rnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 17:26:55 +0000 |
---|---|---|
committer | rnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-05 17:26:55 +0000 |
commit | e6ea48fa9a5a3136614da054ea7c8c818ac9955e (patch) | |
tree | 6f580448c96e276074833e1fe83295841824b694 /tools | |
parent | 38183c7fd7cfb822a3aa3416777273a236ac4d2b (diff) | |
download | chromium_src-e6ea48fa9a5a3136614da054ea7c8c818ac9955e.zip chromium_src-e6ea48fa9a5a3136614da054ea7c8c818ac9955e.tar.gz chromium_src-e6ea48fa9a5a3136614da054ea7c8c818ac9955e.tar.bz2 |
Let DrMemory LEAK supressions suppress POSSIBLE LEAK reports.
TBR=timurrrr@chromium.org
BUG=109273
TEST=Added test to suppressions.py; will use with work on suppressing remaining full mode reports
Review URL: http://codereview.chromium.org/9116007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116500 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/valgrind/suppressions.py | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/tools/valgrind/suppressions.py b/tools/valgrind/suppressions.py index ecdb78b..5930c65 100755 --- a/tools/valgrind/suppressions.py +++ b/tools/valgrind/suppressions.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -347,7 +347,12 @@ class DrMemorySuppression(Suppression): self.instr = instr # Construct the regex. - regex = '{\n%s\nname=.*\n' % report_type + regex = '{\n' + if report_type == 'LEAK': + regex += '(POSSIBLE )?LEAK' + else: + regex += report_type + regex += '\nname=.*\n' # TODO(rnk): Implement http://crbug.com/107416#c5 . # drmemory_analyze.py doesn't generate suppressions with an instruction in @@ -786,6 +791,26 @@ def SelfTest(): TestStack(stack_not_ntdll, suppress_in_any, suppress_in_ntdll, suppression_parser=ReadDrMemorySuppressions) + # Suppress a POSSIBLE LEAK with LEAK. + stack_foo_possible = """{ + POSSIBLE LEAK + name=foo possible + *!foo + }""" + suppress_foo_possible = [ "POSSIBLE LEAK\n*!foo\n" ] + suppress_foo_leak = [ "LEAK\n*!foo\n" ] + TestStack(stack_foo_possible, suppress_foo_possible + suppress_foo_leak, [], + suppression_parser=ReadDrMemorySuppressions) + + # Don't suppress LEAK with POSSIBLE LEAK. + stack_foo_leak = """{ + LEAK + name=foo leak + *!foo + }""" + TestStack(stack_foo_leak, suppress_foo_leak, suppress_foo_possible, + suppression_parser=ReadDrMemorySuppressions) + # Test that the presubmit checks work. forgot_to_name = """ UNADDRESSABLE ACCESS |