Tcl Source Code

View Ticket
Login
Ticket UUID: df6a0e97f2322ef0d26d12df34109def994968fa
Title: valgrind hates format-2.18
Type: Bug Created on: 2021-06-07 17:55:42
Submitter: dgp Assigned to: nobody
Subsystem: 10. Objects Severity: Minor
Priority: 5 Medium Last modified: 2026-10-22 17:19:32
Status: Closed Closed by: serhiy.storchaka
Resolution: Out of Date Closed on: 2026-10-21 10:09:08
Version: 8.7a5rc0
Description:
==9010== Conditional jump or move depends on uninitialised value(s)
==9010==    at 0x598AFA: Tcl_UniCharToUtf (tclUtf.c:234)
==9010==    by 0x58ABD1: ExtendStringRepWithUnicode (tclStringObj.c:4408)
==9010==    by 0x58AA66: UpdateStringOfString (tclStringObj.c:4349)
==9010==    by 0x5638D6: Tcl_GetStringFromObj (tclObj.c:1703)
==9010==    by 0x587494: Tcl_AppendFormatToObj (tclStringObj.c:2521)
==9010==    by 0x587716: Tcl_Format (tclStringObj.c:2595)
==9010==    by 0x481EC1: TclCompileFormatCmd (tclCompCmds.c:3190)
==9010==    by 0x503D41: TclAttemptCompileProc (tclEnsemble.c:3287)
==9010==    by 0x4E16FE: CompileCmdCompileProc (tclCompile.c:1988)
==9010==    by 0x4E1D2C: CompileCommandTokens (tclCompile.c:2104)
==9010==    by 0x4E229C: TclCompileScript (tclCompile.c:2264)
==9010==    by 0x4DF09C: TclSetByteCodeFromAny (tclCompile.c:835)
==9010==    by 0x5093B7: TclCompileObj (tclExecute.c:1776)
==9010==    by 0x43564C: TclNREvalObjEx (tclBasic.c:6546)
==9010==    by 0x578F47: TclNRUplevelObjCmd (tclProc.c:984)
==9010==    by 0x4328B9: Dispatch (tclBasic.c:4816)
==9010==    by 0x432941: TclNRRunCallbacks (tclBasic.c:4856)
==9010==    by 0x43220D: Tcl_EvalObjv (tclBasic.c:4575)
==9010==    by 0x4346CA: TclEvalEx (tclBasic.c:5727)
==9010==    by 0x54FA2F: Tcl_FSEvalFileEx (tclIOUtil.c:1782)
==9010==    by 0x55A143: Tcl_MainEx (tclMain.c:399)
==9010==    by 0x40F9B8: main (tclAppInit.c:91)
==9010==
User Comments:
serhiy.storchaka added on 2026-10-21 10:09:08:

No longer reproducible: since TIP #619 ([3bb6f6602c], in 9.0.0) Tcl_UniCharToUtf only looks at the previous bytes when TCL_COMBINE is passed, and valgrind on format-2.18 is clean on 8.6, 9.0 and 9.1.