[vtk-developers] fix for http://zlib.net/zlib_faq.html#faq36

David Cole david.cole at kitware.com
Fri Jan 22 19:09:20 EST 2010


On Fri, Jan 22, 2010 at 5:32 PM, Mark Adler <madler at alumni.caltech.edu>wrote:

> On Jan 22, 2010, at 11:40 AM, David Cole wrote:
> > 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?)
>
> David,
>
> The memset() can be a performance hit when many small deflate operations
> are done, which is the case for message passing applications.
>
> 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.
>
> 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.
>
> Mark
>
>
Excellent!

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.

Are you saying valgrind was incorrect and that the buffer in question is not
actually referenced in its uninitialized state?


Thanks again,
David Cole

(B.S. '89 from Caltech -- sometimes I miss Pasadena... :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100122/f491098c/attachment.html>


More information about the vtk-developers mailing list