Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2010-03-30
21:52 • Closed ticket [2979399fff]: uninitialized value troubles plus 7 other change... artifact: d76873bc03 user: dgp
21:43 • Ticket [2979399fff]: 4 changes artifact: 583122a8c3 user: nijtmans
21:41 • Ticket [2979399fff]: 4 changes artifact: 885794678a user: nijtmans
21:27 • Open ticket [2979399fff]. artifact: d9588d6aa0 user: dgp
21:17 • Closed ticket [2979399fff]. artifact: 51e852fd68 user: nijtmans
21:10 • Ticket [2979399fff]: 5 changes artifact: f4db0f64c7 user: nijtmans
13:45 • New ticket [2979399fff]. artifact: 4c2dd04935 user: dgp

uninitialized value troubles

Closed / Invalid2979399fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2010-03-30 13:45:59
A few complaints from valgrind running
the test suite:

---- zlib-4.2 start
==26179== Conditional jump or move depends on uninitialised value(s)
==26179==    at 0x457D82: (within /usr/lib/libz.so.1.2.3)
==26179==    by 0x458EA0: (within /usr/lib/libz.so.1.2.3)
==26179==    by 0x4582D6: deflate (in /usr/lib/libz.so.1.2.3)
==26179==    by 0x81954CC: Tcl_ZlibDeflate (tclZlib.c:1413)
==26179==    by 0x8195F29: TclZlibCmd (tclZlib.c:1824)
==26179==    by 0x80F2D80: NRRunObjProc (tclBasic.c:4347)
==26179==    by 0x80F2B6C: TclNRRunCallbacks (tclBasic.c:4294)
==26179==    by 0x816A564: TclExecuteByteCode (tclExecute.c:2807)
++++ zlib-4.2 PASSED

---- zlib-9.6 start
==26179==
==26179== Conditional jump or move depends on uninitialised value(s)
==26179==    at 0x457D4F: (within /usr/lib/libz.so.1.2.3)
==26179==    by 0x458EA0: (within /usr/lib/libz.so.1.2.3)
==26179==    by 0x4582D6: deflate (in /usr/lib/libz.so.1.2.3)
==26179==    by 0x81971EE: ZlibTransformClose (tclZlib.c:2348)
==26179==    by 0x8071C5B: ChanClose (tclIO.c:258)
==26179==    by 0x8073D30: CloseChannel (tclIO.c:2673)
==26179==    by 0x8073A77: FlushChannel (tclIO.c:2556)
==26179==    by 0x8074552: Tcl_Close (tclIO.c:3104)
++++ zlib-9.6 PASSED
nijtmansplain2010-03-30 21:10:25
My guess is that not all fields of z_stream are initialized.
nijtmansplain2010-03-30 21:17:35
allow_comments - 1

Fixed in HEAD
dgpplain2010-03-30 21:27:51
allow_comments - 0


Thanks for the rapid response, but your
changes did not have any effect on the
valgrind results.
nijtmansplain2010-03-30 21:41:50
Then it must be a bug in zlib itself, since all variables going
into the deflate() function are initialized now.

Dus zlib 1.2.4 have the same problem? Maybe you can fool
the configure script that zlib is not available, so it will compile
in the zlib source supplied with Tcl. That will give line
numbers within zlib, so hopefully that gives more information.
nijtmansplain2010-03-30 21:43:20
Zlib 1.2.5 will come out soon, so if we can trace this, it's still time to get this fix in zlib 1.2.5
dgpplain2010-03-30 21:52:49
allow_comments - 1


Forcing the use of the zlib sources
bundled with Tcl made the problem go
away.  Sorry for the noise.
Log in (anonymous is fine) to add a comment.