On Fri, Jan 22, 2010 at 5:32 PM, Mark Adler <span dir="ltr"><<a href="mailto:madler@alumni.caltech.edu">madler@alumni.caltech.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Jan 22, 2010, at 11:40 AM, David Cole wrote:<br>
> It would be delightful if we could get this simple one line addition committed in the official zlib sources. After all, it's not really a huge performance hit to zero out this one buffer at initialization time is it? (deflateInit2_ is only called once per deflate operation, right?)<br>
<br>
</div>David,<br>
<br>
The memset() can be a performance hit when many small deflate operations are done, which is the case for message passing applications.<br>
<br>
In any case, the current beta versions of zlib (1.2.3.4 and later) have a different fix which does not have a detectable performance hit. I expect to release a new production version, 1.2.4, within a month or two.<br>
<br>
I had resisted taking the risk of modifying perfectly correct code that had been in extensive use for a decade in order to address a report from a buggy code analyzer, but I finally caved in.<br>
<font color="#888888"><br>
Mark<br>
<br>
</font></blockquote></div><br><div>Excellent!</div><div><br></div><div>Thanks for the quick reply. We will be happy to adopt zlib 1.2.4 into our open source code bases after you've released it.</div><div><br></div><div>
Are you saying valgrind was incorrect and that the buffer in question is not actually referenced in its uninitialized state?</div><div><br></div><div><br></div><div>Thanks again,</div><div>David Cole</div><div><br></div><div>
(B.S. '89 from Caltech -- sometimes I miss Pasadena... :-)</div><div><br></div>