Skip to content
Tcl Source Code History Of Ticket fb4a0a6675
Login

History Of Ticket fb4a0a6675

Artifacts Associated With Ticket fb4a0a6675

  1. Ticket change [74333d1cd2] (rid 198194) by chrstphrchvz on 2022-02-17 00:55:29:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Except for maybe 35 minutes before and after the epoch, there is always signed integer overflow in <tt>TclpGetClicks()</tt> implementations:
      
      <blockquote><pre>
      % clock clicks
      <span style="font-weight:bold">tcl/unix/tclUnixTime.c:152:19:<span style="color:red"> runtime error: </span>signed integer overflow: 1645057584 * 1000000 cannot be represented in type 'long int'</span>
      3505507099
      </pre></blockquote>
      
      The attached patch should avoid this, however I have only tested the case for Unix with <tt>gettimeofday()</tt>, and not the cases for Unix without <tt>gettimeofday()</tt> nor Windows without <tt>NativeGetMicroseconds()</tt>.
      
    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: "16. Commands A-H"
    14. title initialized to: "signed integer overflow in TclpGetClicks()"
    15. type initialized to: "Patch"
  2. Add attachment "clock-clicks.diff" [b95f9b6a5f] (rid 198195) by chrstphrchvz on 2022-02-17 00:55:46.

  3. Ticket change [449c4bab98] (rid 198196) by chrstphrchvz on 2022-02-17 00:58:35:

    1. comment changed to:
      Except for maybe 35 minutes before and after the epoch, there is always signed integer overflow in <tt>TclpGetClicks()</tt> implementations when <tt>long</tt> is 32-bit:
      
      <blockquote><pre>
      % clock clicks
      <span style="font-weight:bold">tcl/unix/tclUnixTime.c:152:19:<span style="color:red"> runtime error: </span>signed integer overflow: 1645057584 * 1000000 cannot be represented in type 'long int'</span>
      3505507099
      </pre></blockquote>
      
      The attached patch should avoid this, however I have only tested the case for Unix with <tt>gettimeofday()</tt>, and not the cases for Unix without <tt>gettimeofday()</tt> nor Windows without <tt>NativeGetMicroseconds()</tt>.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/plain"
  4. Ticket change [a467401033] (rid 198426) by jan.nijtmans on 2022-02-23 14:16:29:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459634.09478338"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [8779e57115edee5c|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"