Skip to content
Tcl Source Code History Of Ticket 05ff16e799
Login

History Of Ticket 05ff16e799

Artifacts Associated With Ticket 05ff16e799

  1. Ticket change [c22669188a] (rid 199966) by chrstphrchvz on 2022-04-07 18:58:01:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Example script (assumes your Tcl already has the fix for [0e8fd6c6d5]):
      
      <blockquote>
      <pre>
      set z &#91;string repeat "\u0000" 1073741820&#93;
      puts stderr &#91;::tcl::unsupported::representation $z&#93;<br />
      # create string obj with longest possible unicode rep and no string rep
      set zz &#91;string replace $z 0 1 $z&#93;
      puts stderr &#91;::tcl::unsupported::representation $zz&#93;<br />
      # force generating string rep (should abort due to exceeding max size for a Tcl value)
      set ZZ &#91;string toupper $zz&#93;
      puts stderr &#91;::tcl::unsupported::representation $ZZ&#93;
      </pre>
      </blockquote>
      
      Output containing UBSan <tt>-fsanitize=signed-integer-overflow</tt> error (which the attached patch prevents):
      
      <blockquote>
      <pre>
      value is a pure string with a refcount of 2, object pointer at 0x604000041490, string representation "..."
      value is a string with a refcount of 2, object pointer at 0x604000041c10, internal representation 0x316793800:0xbebebebebebebebe, no string representation
      <span style="font-weight:bold">tcl/generic/tclStringObj.c:3344:7: <span style="color:firebrick">runtime error:</span> signed integer overflow: 2147483646 + 2 cannot be represented in type 'int'</span>
      max size for a Tcl value (2147483647 bytes) exceeded
      </pre>
      (tclsh aborted)
      </blockquote>
      
    5. foundin initialized to: "core-8-6-branch"
    6. is_private initialized to: "0"
    7. login: "chrstphrchvz"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "chrstphrchvz"
    13. subsystem initialized to: "10. Objects"
    14. title initialized to:
      signed integer overflow in ExtendStringRepWithUnicode()
      
    15. type initialized to: "Patch"
  2. Add attachment "05ff16e799.diff" [489bd977ce] (rid 199967) by chrstphrchvz on 2022-04-07 19:12:22.

  3. Ticket change [0e8f283693] (rid 199975) by jan.nijtmans on 2022-04-08 09:17:49:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459677.88737466"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Merged to 8.6 and 8.7 (no problem on 9.0)
      
      Thanks!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"