summaryrefslogtreecommitdiffstats
path: root/tools/heapcheck
diff options
context:
space:
mode:
authorglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 14:53:36 +0000
committerglider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-20 14:53:36 +0000
commit66d3bf688bf2af72ca9182a1a1195b97b06a8015 (patch)
treefe7fbf57bc9dea20dffc83e21567f1a29f78cb0f /tools/heapcheck
parentd7e5525dd72ef8fdd865d2ae0c8692f69b1856bf (diff)
downloadchromium_src-66d3bf688bf2af72ca9182a1a1195b97b06a8015.zip
chromium_src-66d3bf688bf2af72ca9182a1a1195b97b06a8015.tar.gz
chromium_src-66d3bf688bf2af72ca9182a1a1195b97b06a8015.tar.bz2
Print suppressions for the leaks reported by heap leak checker.
TBR=tvl Review URL: http://codereview.chromium.org/1681001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45035 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/heapcheck')
-rw-r--r--tools/heapcheck/heapcheck_test.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/heapcheck/heapcheck_test.py b/tools/heapcheck/heapcheck_test.py
index d989f03..178a35f 100644
--- a/tools/heapcheck/heapcheck_test.py
+++ b/tools/heapcheck/heapcheck_test.py
@@ -113,6 +113,18 @@ class HeapcheckWrapper(object):
% tuple(cur_leak_signature))
print '\n'.join(cur_report)
return_code = 1
+ # Generate the suppression iff the stack contains more than one
+ # frame (otherwise it's likely to be broken)
+ if len(cur_stack) > 1:
+ print 'Suppression:\n{'
+ print ' <insert_a_suppression_name_here>'
+ print ' Heapcheck:Leak'
+ for frame in cur_stack:
+ print ' fun:' + frame
+ print '}'
+ else:
+ print ('This stack may be broken due to omitted frame pointers. '
+ 'It''s not recommended to suppress it')
else:
# Update the suppressions histogram.
if description in used_suppressions: