Skip to content
Tcl Source Code View Ticket
Login

View Ticket

zlib-8.10 is broken

Closed / Wont Fix98c8b3ec125181bb2d8c6c2aa2f10fa9d54ae6a4Created 13 years agoUpdated 13 years ago
Descriptionhtml2013-09-01 20:16:07

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

Referenced by2
  • 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:15
  • dde62ffdf8[98c8b3ec12] Make test fail in less catastrophic manner. check-in2013-09-04 09:36:22
dkf Ticket [98c8b3ec12]: 4 changes [History diff]2013-09-01 20:16:44
dkfhtml2013-09-02 08:00:14

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.

dgpplain2013-09-02 15:59:57
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?
jan.nijtmansplain2013-09-02 21:47:58
Tried it on Linux, Cygwin and win32/64, on none of those platforms this test fails for me. Something in your environment changed?
dkfhtml2013-09-04 09:47:15

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...

dkfhtml2013-10-10 21:26:25

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.

Log in (anonymous is fine) to add a comment.