Skip to content
Tcl Source Code History Of Ticket 4789e18fcb
Login

History Of Ticket 4789e18fcb

Artifacts Associated With Ticket 4789e18fcb

  1. Ticket change [791cc4c907] (rid 198192) by chrstphrchvz on 2022-02-17 00:12:05:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      This command (equivalent to test obj-31.6) triggers signed integer overflow (undefined behavior), which the attached patch addresses:
      
      <blockquote><pre>
      % string index {} end--0x80000000    
      <span style="font-weight:bold">tcl/generic/tclUtil.c:3846:15:<span style="color:red"> runtime error: </span>negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself</span>
      <span style="font-weight:bold">tcl/generic/tclUtil.c:3770:26:<span style="color:red"> runtime error: </span>signed integer overflow: -1 + -2147483648 cannot be represented in type 'int'</span>
      </pre></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: "13. Index Object"
    14. title initialized to: "signed integer overflow during obj-31.6"
    15. type initialized to: "Patch"
  2. Add attachment "obj-31.6-overflow.diff" [597e2e82a2] (rid 198193) by chrstphrchvz on 2022-02-17 00:12:41.

  3. Ticket change [1d5fee5fa6] (rid 198213) by chrstphrchvz on 2022-02-17 09:52:53:

    1. icomment:
      Does the patch address the existing overflow concerns in <tt>SetEndOffsetFromAny()</tt>, or did those refer to something else (e.g. whether an overflow made sense as a useful result)?
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  4. Ticket change [1037e654e5] (rid 198777) by jan.nijtmans on 2022-03-06 16:16:27:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459645.1780999"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Thanks!  Fixed now in [7913cae186572c3d].
      
      This problem was already fixed in Tcl 8.7, thanks to [https://core.tcl-lang.org/tips/doc/trunk/tip/502.md|TIP #502]. Your patch does nothing more than eliminate the warnings using type-casts, it doesn't change the result for 8.6, so that's OK for 8.6.
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"