Bug 79787

Summary: Suppresions files should be auto generated
Product: [Developer tools] valgrind Reporter: Madhu M Kurup <mmk>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: wishlist CC: pjfloyd
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Patch to add the required functionality to auto gen suppressions

Description Madhu M Kurup 2004-04-17 00:41:50 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5) 
OS:          Linux

Valgrind should be able to automatically create suppression files. These should be:

 - create a suppfile / pid
 - determines frequency counts for suppressions seen
 - orders suppressions in decreasing order of appearing
Comment 1 Madhu M Kurup 2004-04-17 00:44:16 UTC
Created attachment 5665 [details]
Patch to add the required functionality to auto gen suppressions
Comment 2 Darryl L. Miles 2006-06-18 17:49:28 UTC
Gets my vote.

I was thinking the "Print suppression ? --- [Return/N/n/Y/y/C/c]" could be extended to a new option to "A/a" add/append supression to the file.

This patch appears a few years old now, does that mean its been rejected ?
Comment 3 Paul Floyd 2024-06-26 14:49:33 UTC
I think that this was mostly covered by

commit 6c9a668a42b0861ca080d0ad0685d52bbfb77480
Author: Julian Seward <jseward@acm.org>
Date:   Mon Jan 10 17:24:47 2005 +0000

    Add a new variant for --gen-suppressions: --gen-suppressions=all,
    which just prints a suppression for all reported errors without asking
    questions.    
    
    git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3219

There's no separate file option.
Printing suppressions can be obtaines=d with -s. The sorting is (I think) based on the order of the suppressoons rather than the count.

Personally I feel it's better to make suppression generation not too easy. Lazy developers will just use it to suppress everything and then be able to claim "no Valgrind leaks".