Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2016-10-30
05:10 • Closed ticket [b26e38a3e4]: zlib stream buffer flushing failure plus 6 other... artifact: 79e232bbdb user: dkf
05:05
[b26e38a3e4] Ensure that compressing streams manage buffers correctly in all cases. check-in: f85e0e4fe4 user: dkf tags: trunk
05:04
[b26e38a3e4] Ensure that compressing streams manage buffers correctly in all cases. check-in: 83a6a4d431 user: dkf tags: core-8-6-branch
04:50 • Ticket [b26e38a3e4] zlib stream buffer flushing failure status still Open wi... artifact: f8211e113c user: dkf
2016-10-29
20:54 • Ticket [b26e38a3e4]: 3 changes artifact: 804cdbd4e0 user: dkf
20:47 • New ticket [b26e38a3e4]. artifact: c498d7ebe9 user: dkf

zlib stream buffer flushing failure

Closed / Fixedb26e38a3e4546b01e3d12d0d7df8f69b52d869b3Created 10 years agoUpdated 10 years ago
Descriptionwiki2016-10-29 20:47:12
Tk issue 10f2e7872b reports that PNG writing is broken. It turns out this is because when a zlib-internal buffer in the streaming engine is entirely full, it is not always transferred to the output buffer. The bug was triggered on the Tk side by a change in the pattern of bytes generated, but the bug is in Tcl.

Fortunately, the streaming engine is exposed to Tcl so we can easily test it.

Referenced by2
  • f85e0e4fe4[b26e38a3e4] Ensure that compressing streams manage buffers correctly in all cases. check-in2016-10-30 05:05:46
  • 83a6a4d431[b26e38a3e4] Ensure that compressing streams manage buffers correctly in all cases. check-in2016-10-30 05:04:54
dkfwiki2016-10-29 20:54:08

The major issue to learn from this is to be ultra-careful when reading someone else's documentation. The zlib library's documentation (in the zlib.h header) is correct, but it all works in a totally different way to Tcl's API, making it very easy to miss important things that only get seen with large real data. Small data of the sort one usually tests with just works…

dkf Ticket [b26e38a3e4]: 4 changes [History diff]2016-10-30 04:50:13
dkfplain2016-10-30 05:10:39
Fixed on 8.6 and trunk.
Log in (anonymous is fine) to add a comment.