Boost C++ Libraries: Ticket #3352: CRC not correctly computed on x64 during decompression of gzip archive https://svn.boost.org/trac10/ticket/3352 <p> A difference in datatypes causes an overflow error (or lack thereof). </p> <p> Steps to reproduce:<br /> </p> <ol><li>Generate a gzip archive of sufficient size (140K?)<br /> </li><li>Decompress with iostreams filter. </li></ol><p> Attached: Proposed change to zlib typedefs<br /> Tested on Kubuntu x86 &amp; Debian x64 </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/3352 Trac 1.4.3 thomas.suckow@… Tue, 18 Aug 2009 17:38:49 GMT attachment set https://svn.boost.org/trac10/ticket/3352 https://svn.boost.org/trac10/ticket/3352 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_zlib.diff</span> </li> </ul> <p> Patch </p> Ticket thomas.suckow@… Tue, 18 Aug 2009 17:44:28 GMT <link>https://svn.boost.org/trac10/ticket/3352#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3352#comment:1</guid> <description> <p> Line of fault is: </p> <p> crc_ += value &lt;&lt; (offset_ * 8); </p> <p> in gzip.cpp </p> <p> When the shift results in a large negative value, the 32bit crc should roll over. But long on x64 is 64bit and the result is incorrect. </p> </description> <category>Ticket</category> </item> <item> <author>thomas.suckow@…</author> <pubDate>Thu, 27 Aug 2009 17:15:42 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/3352#comment:2 https://svn.boost.org/trac10/ticket/3352#comment:2 <ul> <li><strong>milestone</strong> <span class="trac-field-old">Boost 1.40.0</span> → <span class="trac-field-new">Boost 1.41.0</span> </li> </ul> Ticket thomas.suckow@… Thu, 27 Aug 2009 17:25:52 GMT type changed https://svn.boost.org/trac10/ticket/3352#comment:3 https://svn.boost.org/trac10/ticket/3352#comment:3 <ul> <li><strong>type</strong> <span class="trac-field-old">Bugs</span> → <span class="trac-field-new">Patches</span> </li> </ul> Ticket Daniel James Thu, 12 Nov 2009 19:20:11 GMT <link>https://svn.boost.org/trac10/ticket/3352#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/3352#comment:4</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57610" title="Fix CRC on x64 during gzip decompression. Refs #3352. Thanks to ...">[57610]</a>) Fix CRC on x64 during gzip decompression. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3352" title="#3352: Patches: CRC not correctly computed on x64 during decompression of gzip archive (closed: fixed)">#3352</a>. </p> <p> Thanks to Thomas Suckow. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sat, 02 Jan 2010 11:51:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/3352#comment:5 https://svn.boost.org/trac10/ticket/3352#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58633" title="Merge iostream fixes, mostly by Richard Smith. Fixes #3612, #3311, ...">[58633]</a>) Merge iostream fixes, mostly by Richard Smith. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3612" title="#3612: Bugs: Throwing heap-allocated exceptions (closed: fixed)">#3612</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3311" title="#3311: Bugs: Unintentionally unthrown exceptions (closed: fixed)">#3311</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2094" title="#2094: Bugs: iostreams fails to compile with -fno-exceptions (closed: fixed)">#2094</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3010" title="#3010: Bugs: Missing include guard in boost/iostreams/device/mapped_file.hpp (closed: fixed)">#3010</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2894" title="#2894: Bugs: Incorrect type for buffer_size and pback_size parameters (closed: fixed)">#2894</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3011" title="#3011: Bugs: code_converter doesn't support boost::ref( std::istream ) (closed: fixed)">#3011</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3352" title="#3352: Patches: CRC not correctly computed on x64 during decompression of gzip archive (closed: fixed)">#3352</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3505" title="#3505: Bugs: mapped_file windows handle validity check patch against 1.40.0 (closed: fixed)">#3505</a>. </p> Ticket