zlib-8.10 is broken
Doing a make test for the trunk, I noticed that zlib-8.10 is broken due to the -errorcode element being not present in the option dictionary. This is a surprising breakage; I've not yet tracked down what caused it.
==== zlib-8.10 transformtion and fconfigure FAILED
==== Contents of test case:
zlib push deflate $outSide -dictionary $spdyDict
fconfigure $outSide -blocking 0 -translation binary -buffering none
fconfigure $inSide -blocking 0 -translation binary
puts -nonewline $outSide $spdyHeaders
chan pop $outSide
set compressed [read $inSide]
catch {zlib inflate $compressed} err opt
list [string length [zlib deflate $spdyHeaders]] [string length $compressed] $err [dict get $opt -errorcode]
---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: key "-errorcode" not known in dictionary
while executing
"dict get $opt -errorcode"
("uplevel" body line 9)
invoked from within
"uplevel 1 $script"
---- errorCode: TCL LOOKUP DICT -errorcode
==== zlib-8.10 FAILED
d6b87763af[98c8b3ec12] Use constraint to work around failing test; it's just a bug in the underlying library, and one that appears fixed in later versions. Not our fault if some OSes don't update. (It's also in a very esoteric spot.) check-in2013-10-10 21:24:15dde62ffdf8[98c8b3ec12] Make test fail in less catastrophic manner. check-in2013-09-04 09:36:22
I can't find any recent changes in generic/tclZlib.c or tests/zlib.test that might cause this. Assigning to someone who might've touched the generic parts of error handling.
I'd like to help, but test zlib-8.10 does not fail for me, and without the ability to reproduce I don't know where to start. Any tips how to induce failure?
Tried it on Linux, Cygwin and win32/64, on none of those platforms this test fails for me. Something in your environment changed?
I think this has to do with the version of zlib itself in use (I think it's 1.2.5; “Gee! Thanks a lot, Apple!”)
I've improved the test so in this case it now fails with a less unpleasant error:
==== zlib-8.10 transformation and fconfigure FAILED
==== Contents of test case:
zlib push deflate $outSide -dictionary $spdyDict
fconfigure $outSide -blocking 0 -translation binary -buffering none
fconfigure $inSide -blocking 0 -translation binary
puts -nonewline $outSide $spdyHeaders
chan pop $outSide
set compressed [read $inSide]
catch {
zlib inflate $compressed
throw BOGUS "should be unreachable"
} err opt
list [string length [zlib deflate $spdyHeaders]] [string length $compressed] $err [dict get $opt -errorcode]
---- Result was:
254 212 {should be unreachable} BOGUS
---- Result should have been (exact matching):
254 212 {data error} {TCL ZLIB DATA}
==== zlib-8.10 FAILED
That takes it back to being just a failing test...
Thinking about this, there's not much we can really do to reliably fix it, especially as the problem appears to only be present in some older versions of the zlib library. Constrained the test to be not run on known-offending systems.