Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-10-10
21:26 • Closed ticket [98c8b3ec12]: zlib-8.10 is broken plus 7 other changes artifact: 053eb7af09 user: dkf
21:24
[98c8b3ec12] Use constraint to work around failing test; it's just a bug in the underlying library, ... check-in: d6b87763af user: dkf tags: trunk
2013-09-04
09:47 • Ticket [98c8b3ec12] zlib-8.10 is broken status still Open with 5 other chang... artifact: ea6ba322bb user: dkf
09:36
[98c8b3ec12] Make test fail in less catastrophic manner. check-in: dde62ffdf8 user: dkf tags: trunk
2013-09-02
21:47 • Ticket [98c8b3ec12] zlib-8.10 is broken status still Open with 3 other chang... artifact: e6e8cb632a user: jan.nijtmans
15:59 • Ticket [98c8b3ec12]: 3 changes artifact: 332576787e user: dgp
08:00 • Ticket [98c8b3ec12]: 5 changes artifact: 2614c6e87a user: dkf
2013-09-01
20:16 • Ticket [98c8b3ec12]: 4 changes artifact: 1d26edeee6 user: dkf
20:16 • New ticket [98c8b3ec12]. artifact: 086c46e79a user: dkf

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.