Skip to content
Tcl Source Code History Of Ticket 1230205fff
Login

History Of Ticket 1230205fff

Artifacts Associated With Ticket 1230205fff

  1. Ticket change [a52a7991ba] (rid 110327) by mdejong on 2005-06-30 08:15:45:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      Tcl's expr divide and modulus operations are buggy WRT
      LONG_MIN and LONG_MAX values. The attached patch
      fixes the problems, adds test cases, and reimplements the
      divide operation so that it will execute more quickly. This
      patch has been tested on a 32 bit long system. It
      should also
      work on a system with a 64 bit long, but that has not been
      tested. This is a pure bug fix so it should not require
      a TIP.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "mdejong"
    9. subsystem initialized to: "47. Bytecode Compiler"
    10. title initialized to:
      expr: div and mod support for LONG_MIN and LONG_MAX
      
    11. type initialized to: "Patch"
  2. Add attachment "expr.patch" [0935865ce3] (rid 89681) by mdejong on 2005-06-30 15:15:46.

  3. Ticket change [92a869d913] (rid 120807) by mdejong on 2005-06-30 15:15:47:

    1. icomment:
      
      
      File Added - 140329: expr.patch
      
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  4. Ticket change [519cc5ad6b] (rid 126161) by msofer on 2005-06-30 17:45:50:

    1. assignee changed to: "kennykb"
  5. Ticket change [be5bd92f80] (rid 102060) by dgp on 2005-06-30 21:05:28:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Unless this is targeted at 8.4.x, seems
      it would be easier just to let TIP 249
      make these corrections.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  6. Ticket change [651b93af14] (rid 92896) by mdejong on 2005-07-01 03:21:09:

    1. icomment:
      Logged In: YES 
      user_id=90858
      
      I don't see how TIP 249 is going to have any effect on this
      issue.
      My reading of TIP 249 indicates that it details how to parse
      numbers into internal representations. This patch deals with
      division and modulus implementation details after the number has
      been converted into a long int or long long integer. This
      patch fixes
      bugs in Tcl's implementation of division and modulus that
      show up
      when the largest or smallest integers for a given type are
      used. Also,
      I do intend to check these changes into Tcl 8.4.
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  7. Ticket change [ae1bd0b77e] (rid 101580) by hobbs on 2005-07-01 06:44:55:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      A bug is a bug, and it should go into 8.4 if the patch is
      correct for it.  Should I test these specifically on systems
      with 64-bit long (eg, Solaris 64-bit), or more extensive
      testing of some other form?
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  8. Add attachment "expr2.patch" [271a9a75d1] (rid 88456) by mdejong on 2005-07-01 08:23:45.

  9. Ticket change [574b8e5c3e] (rid 94464) by mdejong on 2005-07-01 08:23:45:

    1. icomment:
      Logged In: YES 
      user_id=90858
      
      I did some more testing today and found a problem. I have
      attached an
      updated patch that should be the final form. As far as 32 vs
      64 bit tests go, I think that expr.test will work for both
      32 bit machines with long and long long types and 64 bit
      long systems. I have only tested on 32bit long systems.
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  10. Ticket change [d40d2aff3f] (rid 123384) by mdejong on 2005-07-01 08:23:46:

    1. icomment:
      
      
      File Added - 140440: expr2.patch
      
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  11. Ticket change [5a0880299f] (rid 118072) by dgp on 2005-07-02 02:16:16:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      
      I'd like to look into whether this
      can be corrected more easily
      in the expr parser instead of 
      the bytecode execution engine.
      
      
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  12. Ticket change [da4d66d3f9] (rid 107747) by mdejong on 2005-07-02 04:31:56:

    1. icomment:
      Logged In: YES 
      user_id=90858
      
      Well, this is not a number parsing bug. It is a problem with
      Tcl's implementation of the divide and modulus operators in
      the expr
      code. The code in question lives in the bytecode execution
      module,
      but it really part of the functionality covered by the expr
      command.
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  13. Ticket change [6004ae2083] (rid 115921) by mdejong on 2005-07-09 07:28:29:

    1. icomment:
      Logged In: YES 
      user_id=90858
      
      Added to CVS on 2005-07-08.
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  14. Ticket change [fb54fd90fc] (rid 92044) by dgp on 2005-07-12 00:10:12:

    1. closedate changed to: "2005-07-11T17:10:12"
    2. closer changed to: "dgp"
    3. resolution changed to: "Accepted"
    4. status changed to: "Closed"
  15. Ticket change [fdbbfa3ca6] (rid 108462) by kennykb on 2005-07-12 05:47:40:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      Uhm.  I wasn't able to give this proper attention while I was
      on vacation, which is when all the real action happened.
      But wasn't one of the issues that the LONG_MIN value
      was incorrectly made 'wide' by the parser?  And doesn't
      it make sense to fix that one in the parser rather than the
      bytecode engine?
      
      Or do I have this confused with a different bug?
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  16. Ticket change [3ff737bace] (rid 121548) by mdejong on 2005-07-12 06:01:09:

    1. icomment:
      Logged In: YES 
      user_id=90858
      
      Actually, you are thinking of patch 1229765. This patch does
      not have anything to do with parsing of expr literals. This
      patch only changes
      the way that the % and / expr operators are implemented.
      Discussion of
      implementation for that patch should appear elsewhere.
      
      
      
    2. login: "mdejong"
    3. mimetype: "text/plain"
    4. username: "mdejong"
  17. Ticket change [6ec89cb298] (rid 100200) by kennykb on 2005-07-12 06:07:48:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      OK, got it, and 1229765 deals with the (nearly unavoidable)
      problem
      of parsing -0x80000000 as two tokens, '-' and '0x80000000'
      -- with
      the latter causing an overflow to a wide.  As dgp says,
      1229765 is a fine workaround, and TIP #249 should be a 
      permanent fix.  I'm satisfied.
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"