Skip to content
Tcl Source Code History Of Ticket 1de6b0629e
Login

History Of Ticket 1de6b0629e

Artifacts Associated With Ticket 1de6b0629e

  1. Ticket change [247496ab7b] (rid 177957) by dgp on 2019-12-20 14:18:26:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      % expr 1e2147483647
      Inf
      % expr 1e2147483648
      0.0
      
      % expr 10e2147483647
      0.0
      
      Sure there are more cases to illustrate...
      
      Issue is the "exponent" argument of Make(Low|High)PrecisionDouble() has type int, but longs are being passed without care to deal with overflow.
      
    5. foundin initialized to: "8.5+"
    6. is_private initialized to: "0"
    7. login: "dgp"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Important"
    11. status initialized to: "Open"
    12. submitter initialized to: "dgp"
    13. subsystem initialized to: "48. Number Handling"
    14. title initialized to:
      number parser fails handling int overflow in exponents
      
    15. type initialized to: "Bug"
  2. Ticket change [0fa573d87d] (rid 177988) by dgp on 2019-12-22 18:10:50:

    1. icomment:
      
      See committed tests for more similar to the original.
      
      These are different
      
      % expr 0e309
      0.0
      % expr 0e310
      Inf
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  3. Ticket change [201240d4f9] (rid 178013) by dgp on 2019-12-23 16:00:47:

    1. icomment:
      
      Still more....
      
      % expr 1[string repeat 0 324]1e-250
      1e+75
      % expr 1[string repeat 0 325]1e-250
      domain error: argument not in valid range
      
    2. login: "dgp"
    3. mimetype: "text/plain"
  4. Ticket change [375af9450f] (rid 178014) by dgp on 2019-12-23 16:15:17:

    1. assignee changed to: "kbk"
    2. icomment:
      
      The last comment appears to demonstrate something going wrong with RefineApproximation(). This is getting beyond simple fixes. Calling in
      the author.
      
    3. login: "dgp"
    4. mimetype: "text/plain"
  5. Ticket change [ef443c7335] (rid 178044) by kbk on 2019-12-24 14:50:25:

    1. icomment:
      We shouldn't be even getting into RefineApproximation in that case.
      
      I hypothesize that it's getting an integer overflow in the [https://core.tcl-lang.org/tcl/artifact?udc=1&ln=1668-1675&name=8c3f1e7e3892db1e|quick checks in MakeHighPrecisionDouble] but I won't be able to look in more detail for a few days.
      
    2. login: "kbk"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "kbk"
  6. Ticket change [b50b14c8d2] (rid 178054) by kbk on 2019-12-24 17:34:01:

    1. icomment:
      We shouldn't be even getting into RefineApproximation in that case.
      
      I hypothesize that it's getting an integer overflow in the [https://core.tcl-lang.org/tcl/artifact?udc=1&ln=1668-1675&name=8c3f1e7e3892db1e|quick checks in MakeHighPrecisionDouble] but I won't be able to look in more detail for a few days.
      
    2. login: "kbk"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "kbk"
  7. Ticket change [639d2e8d12] (rid 178059) by kbk on 2019-12-26 23:59:31:

    1. icomment:
      Putative fix committed to the branch. Merging and running tests on the cascade of 8.5->8.6->8.7->trunk now and will commit as they succeed.
      
    2. login: "kbk"
    3. mimetype: "text/plain"
  8. Ticket change [efd7da321e] (rid 178067) by kbk on 2019-12-27 00:37:48:

    1. closedate changed to: "2458844.52626115"
    2. closer changed to: "kbk"
    3. icomment:
      All the test cases in the bug report pass now. Merged changes forward to core-8-5-branch, core-8-6-branch, core-8-branch, and trunk.
      
    4. login: "kbk"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  9. Ticket change [761b950787] (rid 178173) by fvogel on 2020-01-02 11:37:42:

    1. closedate changed to: "2458850.98452422"
    2. closer changed to: "fvogel"
    3. icomment:
      Since this fix, the build is now failing with MSVC as follows:
      
      tclStrToD.c
      C:\Users\francois\Documents\Development\tcltk-fossil\tcl\win\..\generic\tclStrToD.c(1585) : error C2220: warning treated as error - no 'object' file generated
      C:\Users\francois\Documents\Development\tcltk-fossil\tcl\win\..\generic\tclStrToD.c(1585) : warning C4013: 'copysign' undefined; assuming extern returning int
      
    4. login: "fvogel"
    5. mimetype: "text/plain"
  10. Ticket change [f1255c5e6d] (rid 178175) by kbk on 2020-01-02 16:44:21:

    1. closer changed to: "nobody"
    2. icomment:
      @fvogel:
      
      (1) Is this a MSVC6 compilation? Recent MSVC's (at least since VS2013) are documented to have copysign.
      
      (2) Does it work to include the following code burst near the top of tclStrToD.c (somewhere after the #includes)?
      
      <pre>
      #if defined(_MSC_VER_)
      inline static double
      copysign(double a, double b) {
          return _copysign(a, b);
      }
      #endif
      </pre>
      
      If it works, could you commit that change and re-close the bug?
      
    3. login: "kbk"
    4. mimetype: "text/x-fossil-wiki"
    5. status changed to: "Open"
  11. Ticket change [f0ebecd3e9] (rid 178184) by fvogel on 2020-01-02 21:04:42:

    1. icomment:
      @kbk: many thanks for the replacement.
      
      1. No, it's a MSVC Express 2008 compiler.
      
      2. Yes it does. I have slightly improved the test to define the replacement function only for MSVC compilers before Visual Studio 2013 since you said VS2013 has it.
      
      Committed now.
      
      Many thanks!
      
    2. login: "fvogel"
    3. mimetype: "text/plain"
  12. Ticket change [5e7bc130fe] (rid 178185) by fvogel on 2020-01-02 21:04:50:

    1. closedate changed to: "2458851.37836698"
    2. closer changed to: "fvogel"
    3. login: "fvogel"
    4. mimetype: "text/plain"
    5. status changed to: "Closed"