Bug 161487 - number of suppressions files is limited to 10
Summary: number of suppressions files is limited to 10
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.3.0
Platform: Unlisted Binaries All
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-01 14:22 UTC by Bruno Haible
Modified: 2008-05-14 08:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
proposed patch (6.02 KB, patch)
2008-05-01 14:23 UTC, Bruno Haible
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Haible 2008-05-01 14:22:32 UTC
In earlier releases, the documentation of the --suppressions option mentioned:
"You may specify up to 10 additional suppression files."

In valgrind-3.3.0/doc/valgrind.1 the text now says:
"You may use as many extra suppressions files as you like."
But this is wrong! The number is still limited to 10 in the source code.

Eric Blake and I don't like arbitrary limits. In fact, GNU gnulib now has several
modules with a suppressions file for each module, and the limit of 10 will hurt
users soon.

Attached you find a proposed patch to get rid of this limit. It is untested,
so please proofread it carefully.
Comment 1 Bruno Haible 2008-05-01 14:23:11 UTC
Created attachment 24584 [details]
proposed patch
Comment 2 Bart Van Assche 2008-05-01 14:43:26 UTC
Thanks for the patch.

Julian, do you think it would be a good idea to implement VG_(clo_suppressions) as an XArray ?
Comment 3 Julian Seward 2008-05-12 22:51:34 UTC
Redoing it using an XArray would be the best solution,although that
would have the bad side effect that all modules that depend on 
m_options would then depend on m_xarray.  Left to myself I'd be 
lazy and simply increase the constant number to say 100.  After all
It's taken 5 years for anyone to complain that VG_CLO_MAX_SFILES of 
10 is too low.
Comment 4 Bart Van Assche 2008-05-13 19:47:31 UTC
Increased maximum number of suppression files to 100 in r8065. Fix will be included in Valgrind version 3.4.0.
Comment 5 Bruno Haible 2008-05-13 23:49:13 UTC
Was anything wrong with the patch I submitted?

If you leave the limit as 100, please fix the documentation, to say
"You may specify up to 100 additional suppression files."
The current wording
"You may use as many extra suppressions files as you like."
(in docs/xml/manual-core.xml line 888) is still wrong.
Comment 6 Julian Seward 2008-05-14 00:49:23 UTC
> Was anything wrong with the patch I submitted?


* it was untested.  It's a lot easier for us to increase one
  #define than to test your patch for you.

* as per previous comments, it would be cleanest to redo your
  patch using the facilities in m_xarray; but then we'd have to
  figure out whether making lots of modules now depend on m_xarray
  causes any new problems.

So at least from here, the 90-10 solution (90% of the benefit
for 10% of the effort) is merely to increase the #define.

> If you leave the limit as 100, please fix the documentation, to say
> "You may specify up to 100 additional suppression files."
> The current wording
> "You may use as many extra suppressions files as you like."
> (in docs/xml/manual-core.xml line 888) is still wrong.


Yes, this is a good point.  Will do.  In fact, is 100 enough
for you?
Comment 7 Bruno Haible 2008-05-14 02:27:34 UTC
> Will do.

Thank you.

> In fact, is 100 enough for you?

Yes, it solves the expected need for the next 1-2 years.
When the number of individual suppressions files provides by gnulib modules
increases beyond 20 or 50, gnulib-tool will anyway have to combine the
suppressions files (like it now already combines Makefile.am pieces into a
single Makefile.am), because otherwise the maintenance burden on the gnulib
user would be too big.
Comment 8 Julian Seward 2008-05-14 08:53:28 UTC
Done.  And merged to the 3.3 branch since the changes are
pretty harmless.

I'm a bit surprised you need so many suppression files.
Does Memcheck really produce many false errors on your code?