[gs-devel] Re: [gs-code-review] Fix for off-by-one error in CIE cache initialization
raph at casper.ghostscript.com
Wed Jun 5 17:45:37 PDT 2002
On Wed, Jun 05, 2002 at 05:39:38PM -0700, L. Peter Deutsch wrote:
> > Incidentally, I've now gone through all the warnings for a few
> > hand-chosen files. I am absolutely _thrilled_ with this tool. All
> > Ghostscript developers should add it to their arsenal.
> How many warnings did Valgrind give in a typical run?
Well, I pretty much took them one at a time, but we're talking about
a couple of dozen.
> How many of them were false positives?
Two or three. In fact, one of the false positives reported (in Xlib)
may well be a real bug.
One class of false positives would probably have been eliminated if I
used plain -g instead of -g -O for the debug build. For the curious,
this was of the form type(ep) == a && size(ep) == b. In this case, the
compiler loads tas as a single 32 bit quantity and compares both in
one shot. When a mismatches and b is uninitialized, Valgrind spits a
You can also put false positives in a "suppress" file. Mine is below.
I consider these extremely good odds. I'm also looking forward to
exploring Valgrind's leak checker and its profiling tools, including
a cache simulator.
More information about the gs-devel