Skip to content
Tcl Source Code History Of Ticket 112e7aa36d
Login

History Of Ticket 112e7aa36d

Artifacts Associated With Ticket 112e7aa36d

  1. Ticket change [9241e84ed8] (rid 198737) by chrstphrchvz on 2022-03-05 22:48:06:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Calling <tt>Tcl_SetObjLength(…, INT_MAX)</tt> or <tt>Tcl_AttemptSetObjLength(…, INT_MAX)</tt> leads to signed integer overflow. The attached patch avoids this.
      
      Example UBSan error:
      <pre>
      <span style="font-weight:bold">tcl/generic/tclStringObj.c:961:27:<span style="color:red"> runtime error: </span>signed integer overflow: 2147483647 + 1 cannot be represented in type 'int'</span>
      </pre>
      
      Example test case to add to stringObj.test (likely not desirable for Tcl to adopt—will panic on systems with insufficient memory):
      <pre>
      test stringObj-4.99 {Tcl_SetObjLength procedure, string lengthened to INT_MAX} testobj {
          testobj freeallvars
          teststringobj set 1 abcdef
          teststringobj setlength 1 &#91;expr 2**31-1&#93;
          list &#91;teststringobj length 1&#93;
      } &#91;list &#91;expr 2**31-1&#93;&#93;
      </pre>
      
    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 Tcl_SetObjLength(), Tcl_AttemptSetObjLength()
      
    15. type initialized to: "Patch"
  2. Add attachment "112e7aa36d.diff" [a01e9b22d1] (rid 198738) by chrstphrchvz on 2022-03-05 22:48:47.

  3. Ticket change [89c227a3bd] (rid 198772) by jan.nijtmans on 2022-03-06 16:00:59:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459645.16735866"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed  [2699f682ae|here]
      
      Thanks for the report and the patch!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"