Skip to content
Tcl Source Code History Of Ticket f3cb2a32d6
Login

History Of Ticket f3cb2a32d6

Artifacts Associated With Ticket f3cb2a32d6

  1. Ticket change [a39ab5420b] (rid 209766) by dgp on 2023-03-06 17:24:24:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-plain"
    4. comment initialized to:
      A valgrind run exposes trouble in test format-2.18
      
      ==19961== Conditional jump or move depends on uninitialised value(s)
      ==19961==    at 0x5A7CF7: Tcl_UniCharToUtf (tclUtf.c:231)
      ==19961==    by 0x59952D: ExtendStringRepWithUnicode (tclStringObj.c:4853)
      ==19961==    by 0x5993C0: UpdateStringOfString (tclStringObj.c:4794)
      ==19961==    by 0x57025B: Tcl_GetStringFromObj (tclObj.c:1705)
      ==19961==    by 0x595DBD: Tcl_AppendFormatToObj (tclStringObj.c:2955)
      ==19961==    by 0x59603F: Tcl_Format (tclStringObj.c:3029)
      ==19961==    by 0x488590: TclCompileFormatCmd (tclCompCmds.c:3190)
      ==19961==    by 0x50A4E3: TclAttemptCompileProc (tclEnsemble.c:3298)
      ==19961==    by 0x4E6873: CompileCmdCompileProc (tclCompile.c:1993)
      ==19961==    by 0x4E6EE2: CompileCommandTokens (tclCompile.c:2109)
      ==19961==    by 0x4E745C: TclCompileScript (tclCompile.c:2269)
      ==19961==    by 0x4E41FE: TclSetByteCodeFromAny (tclCompile.c:838)
      ==19961==    by 0x5111D6: TclCompileObj (tclExecute.c:1776)
      ==19961==    by 0x437DC0: TclNREvalObjEx (tclBasic.c:6732)
      ==19961==    by 0x5868E5: TclNRUplevelObjCmd (tclProc.c:985)
      ==19961==    by 0x434E1F: Dispatch (tclBasic.c:4997)
      ==19961==    by 0x434EA7: TclNRRunCallbacks (tclBasic.c:5037)
      ==19961==    by 0x434773: Tcl_EvalObjv (tclBasic.c:4756)
      ==19961==    by 0x436DD5: TclEvalEx (tclBasic.c:5913)
      ==19961==    by 0x559F7D: Tcl_FSEvalFileEx (tclIOUtil.c:1782)
      ==19961==    by 0x5669A6: Tcl_MainEx (tclMain.c:405)
      ==19961==    by 0x410188: main (tclAppInit.c:94)
      
    5. foundin initialized to: "core-8-branch"
    6. is_private initialized to: "0"
    7. login: "dgp"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "dgp"
    14. subsystem initialized to: "10. Objects"
    15. title initialized to: "uninitialized value in format-2.18"
    16. type initialized to: "Bug"
  2. Ticket change [653375e3ea] (rid 209775) by jan.nijtmans on 2023-03-06 19:39:01:

    1. assignee changed to: "jan.nijtmans"
    2. login: "jan.nijtmans"
    3. mimetype: "text/plain"
  3. Ticket change [125371f964] (rid 209780) by jan.nijtmans on 2023-03-06 20:55:51:

    1. icomment:
      Proposed fix [05e83f801a8a2f3c|here]
      
      In Tcl 8.7, if Tcl_UniCharToUtf() is fed a lower surrogate, it checks if the previous Tcl_UniCharToUtf() call produced an upper surrogate. This previous result is stored in dst[0] and dst[1], but in this situation those two bytes are uninitialized. Initializing dst[0] just before the Tcl_UniCharToUtf() should help.
      
    2. login: "jan.nijtmans"
    3. mimetype: "text/x-fossil-wiki"
    4. resolution changed to: "Fixed"
    5. status changed to: "Pending"
  4. Ticket change [d9022ca2aa] (rid 209805) by jan.nijtmans on 2023-03-07 07:07:52:

    1. closedate changed to: "2460010.79713341"
    2. closer changed to: "jan.nijtmans"
    3. icomment:
      Fixed [b01a3c55eda6af6d|] here (for 8.7 only, not needed in 9.0)
      
    4. login: "jan.nijtmans"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"
  5. Ticket change [b1e5a847c0] (rid 209914) by dgp on 2023-03-08 17:37:37:

    1. closedate changed to: "2460012.23445676"
    2. closer changed to: "dgp"
    3. icomment:
      
      This change shifts the failure to a similar problem in
      the following test format-2.19:
      
      ---- format-2.19 start
      ==6436== Conditional jump or move depends on uninitialised value(s)
      ==6436==    at 0x5A7E59: Tcl_UniCharToUtf (tclUtf.c:231)
      ==6436==    by 0x59968F: ExtendStringRepWithUnicode (tclStringObj.c:4854)
      ==6436==    by 0x59951B: UpdateStringOfString (tclStringObj.c:4794)
      ==6436==    by 0x5703B6: Tcl_GetStringFromObj (tclObj.c:1705)
      ==6436==    by 0x593752: Tcl_AppendObjToObj (tclStringObj.c:1862)
      ==6436==    by 0x4E59AC: TclWordKnownAtCompileTime (tclCompile.c:1783)
      ==6436==    by 0x488512: TclCompileFormatCmd (tclCompCmds.c:3170)
      ==6436==    by 0x50A63E: TclAttemptCompileProc (tclEnsemble.c:3298)
      ==6436==    by 0x4E69CE: CompileCmdCompileProc (tclCompile.c:1993)
      ==6436==    by 0x4E703D: CompileCommandTokens (tclCompile.c:2109)
      ==6436==    by 0x4E75B7: TclCompileScript (tclCompile.c:2269)
      ==6436==    by 0x4E4359: TclSetByteCodeFromAny (tclCompile.c:838)
      ==6436==    by 0x511331: TclCompileObj (tclExecute.c:1776)
      ==6436==    by 0x437F1B: TclNREvalObjEx (tclBasic.c:6732)
      ==6436==    by 0x586A40: TclNRUplevelObjCmd (tclProc.c:985)
      ==6436==    by 0x434F7A: Dispatch (tclBasic.c:4997)
      ==6436==    by 0x435002: TclNRRunCallbacks (tclBasic.c:5037)
      ==6436==    by 0x4348CE: Tcl_EvalObjv (tclBasic.c:4756)
      ==6436==    by 0x436F30: TclEvalEx (tclBasic.c:5913)
      ==6436==    by 0x55A0D8: Tcl_FSEvalFileEx (tclIOUtil.c:1782)
      ==6436==    by 0x566B01: Tcl_MainEx (tclMain.c:405)
      ==6436==    by 0x410188: main (tclAppInit.c:94)
      ==6436== 
      ++++ format-2.19 PASSED
      
      looking....
      
    4. login: "dgp"
    5. mimetype: "text/plain"
  6. Ticket change [a6440ba025] (rid 209916) by dgp on 2023-03-08 19:31:51:

    1. closedate changed to: "2460012.31379317"
    2. icomment:
      
      In test format-2.19 the access to uninitialized memory happens
      when generating the string rep of the argument "%s\uDE02".  The
      first two characters are written as single-byte encoded UTF-8
      into dst.  Then the third character needs to be written starting
      at the 3rd byte of the string rep.  Since the character U+DE02
      is a low surrogate, it reads the 3rd and 4th byte to check for
      residue of a high surrogate, but those bytes are uninitialized.
      
      Moving the initialization to \0 inside the loop disrupts the
      surrogate history mechanism, so that's not an answer.
      
      Maybe a conditional initialization is possible, but getting really
      messy with callers of Tcl_UniCharToUtf() burdened with a lot
      of specialized knowledge to make the call in ways that reliably
      avoid this issue.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  7. Ticket change [c4d8af5223] (rid 210465) by dgp on 2023-03-20 18:46:36:

    1. closedate changed to: "2460024.28237244"
    2. icomment:
      
      Candidate fix on a branch for review.  Adds initialization to the
      allocation routine most often at work.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  8. Ticket change [bbe976c45b] (rid 210706) by jan.nijtmans on 2023-03-22 21:24:53:

    1. closedate changed to: "2460026.39228056"
    2. closer changed to: "jan.nijtmans"
    3. icomment: ""Candidate fix" looks good to me. Thanks!"
    4. login: "jan.nijtmans"
    5. mimetype: "text/x-fossil-wiki"