Skip to content
Tcl Source Code History Of Ticket 7179c6724c
Login

History Of Ticket 7179c6724c

Artifacts Associated With Ticket 7179c6724c

  1. Ticket change [ab0b14dca9] (rid 229918) by sebres on 2024-08-12 12:48:06:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      Compilation of incr command (with immutable offset, as <code><i>INST_INCR_*_IMM</i></code>) seems to be broken on wide constant offset by int overflow.
      Non-compiled or dynamic offset (compiled as <code><i>INST_INCR_*</i></code> instructions without <code><i>_IMM</i></code> suffix) work as expected:
      <code><pre>
        % set i 0; incr i 0xffffff80
        <b style="color:green;">4294967168</b>
        % set i 0; incr i 0xffffff81
        <b style="color:red;">-127</b>
        % set i 0; incr i 0xffffffff
        <b style="color:red;">-1</b>
        % set i 0; incr i 0xffffffff
        <b style="color:red;">-1</b>
        % set i 0; set cmd incr; $cmd i 0xffffffff
        <b style="color:green;">4294967295</b>
        % set i 0; incr i [set x 0xffffffff]
        <b style="color:green;">4294967295</b>
      </pre></code>
      My fork doesn't have this bug, so I'll try to backport the fix.
      
    5. foundin initialized to: "8.5+"
    6. is_private initialized to: "0"
    7. login: "sebres"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "50e9528765c18296566374b3fde2df942c394efd"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "sebres"
    14. subsystem initialized to: "47. Bytecode Compiler"
    15. title initialized to:
      compiilation of incr command is broken on wide constant offset by int overflow
      
    16. type initialized to: "Bug"
  2. Ticket change [656ba930cb] (rid 229919) by sebres on 2024-08-12 12:50:32:

    1. assignee changed to: "sebres"
    2. login: "sebres"
    3. mimetype: "text/plain"
    4. priority changed to: "7 High"
    5. resolution changed to: "Later"
  3. Ticket change [a7d60599c7] (rid 229937) by sebres on 2024-08-12 13:39:02:

    1. assignee changed to: "nobody"
    2. closedate changed to: "2460535.06877421"
    3. closer changed to: "sebres"
    4. icomment:
      Fixed:
      
        - 8.5     - [068a8b152e2da1e0]<br/>
        - 8.6     - [e2f55d60603a87a3]<br/>
        - 8.7/9.0 - [cbabbeed5105d882] / [8f8b3d2903776a4a]<br/>
      
    5. login: "sebres"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. title changed to:
      compilation of incr command is broken on wide constant offset by int overflow
      
  4. Ticket change [f8d2828063] (rid 229938) by sebres on 2024-08-12 13:54:03:

    1. closedate changed to: "2460535.07920403"
    2. icomment:
      By the way, the fix was minimalistic, in opposite to my fix in fork, that uses safe `TclGetSignedIntFromObj` routine (tcl seems not to have yet), which wouldn't success by overflow, and since the code is full with Tcl?_?GetIntFromObj, maybe it'd be time for larger review (to prevent ugly unintended overflows like that everywhere).
      
    3. login: "sebres"
    4. mimetype: "text/x-markdown"
  5. Ticket change [b7b5dda0ed] (rid 229939) by sebres on 2024-08-12 14:27:29:

    1. closedate changed to: "2460535.10242799"
    2. comment changed to:
      Compilation of incr command (with immutable offset, as <code><i>INST_INCR_*_IMM</i></code>) seems to be broken on wide constant offset by int overflow.
      Non-compiled or dynamic offset (compiled as <code><i>INST_INCR_*</i></code> instructions without <code><i>_IMM</i></code> suffix) work as expected:
      <code><pre>
        % set i 0; incr i 0xffffff80
        <b style="color:green;">4294967168</b>
        % set i 0; incr i 0xffffff81
        <b style="color:red;">-127</b>
        % set i 0; incr i 0xffffffff
        <b style="color:red;">-1</b>
        % set i 0; set cmd incr; $cmd i 0xffffffff
        <b style="color:green;">4294967295</b>
        % set i 0; incr i [set x 0xffffffff]
        <b style="color:green;">4294967295</b>
        % set i 0; incr i 4294967169
        <b style="color:red;">-127</b>
        % set i 0; incr i 4294967295
        <b style="color:red;">-1</b>
      </pre></code>
      My fork doesn't have this bug, so I'll try to backport the fix.
      
    3. login: "sebres"
    4. mimetype: "text/plain"