Updates:
        Status: Fixed

Comment #2 on issue 9316 by [email protected]: Incomplete results of  
decompression by gzip and bzip2
http://code.google.com/p/chromium/issues/detail?id=9316

The problem was caused when a 32K input buffer for a filter was exhausted  
(emptied)
at precisely the same time as the 32K output buffer (decompressed output)  
was
maximally filled.  When this happened, and gzip or bzip were the filters,  
then the
truncation could take place.

When surfing over the net, filters are generally called as each packet  
arrives, and
so typically have about 1430 bytes to process in each call.  When that  
happens, it is
very unlikely that the output of a (gzip) filter would be a full 32K of  
data.  That
is why it is relatively rare to see this in the field.  Even if you had a  
very fast
communications pipe, it would be hard to get enough data to generate a full  
32K of
expanded data (from one buffer's worth of input data).

However... when you press back, you get data from the cache.  As a result,  
you'll
regularly get a full 32K of input data for the filter.  That scenario can  
(and did)
cause the filter to be called several times.  After about 3 calls, the the  
input
buffer was exhausted, but the output buffer (for that last call) was only  
partially
filled (hence no bug yet).  The input buffer was then refilled, and after  
about 3
more calls, the input buffer was exhausted, and that exhaustion happened to  
*exactly*
fill 32568 bytes of output.  The surrounding logic then thought that there  
was a
chance that the filter had additional internal state (buffered content,  
that it was
unable to as yet emit), and called the filter again.  The filter didn't  
handle a call
with zero bytes in the input buffer gracefully, and returned an error code,  
which
terminated filter processing on the stream (truncating it).




--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to