Skip to content
Tcl Source Code History Of Ticket 440916ffffffffff
Login

History Of Ticket 440916ffffffffff

Artifacts Associated With Ticket 440916ffffffffff

  1. Ticket change [c3b6524697] (rid 111710) by dgp on 2001-07-13 03:44:37:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
       
      When I force libtcl to include the strtoul() routine 
      from compat/strtoul.c, the following tests in the 
      test suite fail: 
      
      scan-4.38
      scan-4.39
      scan-5.6
      
      This is because strtoul() fails to handle leading
      sign symbols '+' and '-'.
      
    4. foundin initialized to: "obsolete: 8.4a3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "dgp"
    9. subsystem initialized to: "52. Portability Support"
    10. title initialized to: "compat/strtoul.c fails tests"
    11. type initialized to: "Bug"
  2. Ticket change [e040d30db9] (rid 115154) by dgp on 2001-07-13 10:55:31:

    1. assignee changed to: "das"
    2. icomment:
      
      
      File Added - 8376: strtoul.patch
      
      Logged In: YES 
      user_id=80530
      
      
      Here's the patch.  Assigning to maintainer for review.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. username: "dgp"
  3. Add attachment "strtoul.patch" [33e73c4371] (rid 106672) by dgp on 2001-07-13 12:28:14.

  4. Ticket change [2dee5e51f6] (rid 119137) by dgp on 2001-07-13 12:28:14:

    1. icomment:
      
      
      File Deleted - 8376: 
      
      
      
      File Added - 8377: strtoul.patch
      
      Logged In: YES 
      user_id=80530
      
      When both compat/strtoul.c and compat/strtol.c are
      linked in, test scan-4.42 fails because strtoul()
      fails to recognize "0X" as a valid hex prefix.
      
      The updated patch corrects this problem as well.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [99b6f8d757] (rid 110840) by dgp on 2001-08-27 08:03:56:

    1. assignee changed to: "hobbs"
  6. Ticket change [7eb552966f] (rid 97464) by das on 2001-09-01 08:33:27:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      on the mac, string-6.37 fails because of missing error 
      checking in compat/strtoul.c, the attached updated patch adds 
      appropriate overflow checking.
      
      With the updated strtoul.c all test now pass on mac.
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  7. Ticket change [b15af73776] (rid 98131) by das on 2001-09-01 15:27:45:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      It appears the earlier patch didn't get attached properly, 
      here is a new version:
      
      The Metrowerks implementations of strtoul, strtol, atoi and 
      atol are all using the same underlying code, so by just 
      replacing the standard library strtoul by compat/strtoul.c I 
      was getting inconsistencies between uses of strtoul and 
      strtol etc.
      
      The updated patch has implementations of all these routines 
      now, based on the earlier strtoul patch
      
      strtol, atoi and atol may need to be #ifdef MAC_TCL 'd out if 
      they cause problems on other systems, please review.
      
      All tests pass on mac with this patch.
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  8. Add attachment "strtoul-2.patch" [5bfe0ca00e] (rid 118419) by das on 2001-09-01 15:27:46.

  9. Ticket change [f522cb2a49] (rid 130056) by das on 2001-09-01 15:27:46:

    1. icomment:
      
      
      File Added - 10241: strtoul-2.patch
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  10. Ticket change [2791eafe75] (rid 88544) by dgp on 2001-09-05 06:36:56:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      The latest patch puts an implementation of strtol()
      in the file compat/strtoul.c .  Does that mean the
      file compat/strtol.c is no longer needed?
      
      The private internal helper routine __private_strtoul
      begins with two "_"'s.  Seems to me that treads on some
      reserved territory, at least with some compilers (?).
      Why not leave off the leading __ ?  It's a static
      function so we shouldn't need to worry about conflicts,
      right?
      
      There are also some CONST issues that need fixing too.
      I'm working on that, but please comment on these other
      points.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  11. Ticket change [098b1b2463] (rid 113677) by das on 2001-09-05 07:26:44:

    1. icomment:
      Logged In: YES 
      user_id=90580
      
      Ah yes, thanks, I forgot to mention that, the strtol() in 
      strtol.c has the same problems w.r.t to error reporting (i.e. 
      there is none), moreover when adding error reporting to 
      strtol one can't call strtoul anymore as the information 
      necessary to determine strtol error conditions isn't passed 
      back...
      which is why I put them both into the same file and call a 
      common private_strtoul() function. So indeed compat/strtoul.c 
      can go away.
      
      There is no reason for the leading __ to private_strtoul, 
      you're correct it's better to leave them off; sorry about 
      that. The only reason they are there is that the code I 
      looked at for guidance had something similar...
      
      Thanks for looking into the const issues.
      
      
      
    2. login: "das"
    3. mimetype: "text/plain"
    4. username: "das"
  12. Ticket change [cb9d6dde4e] (rid 95550) by dgp on 2001-09-06 03:29:43:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      The strtol() in the latest patch is broken on 64-bit Alpha.
      This starts to touch on the 64-bit int handling issues
      also under examination elsewhere.
      
      If possible, I'd like to limit this patch to fixing the
      bugs in the strtoul() routine in compat/strtoul.c and
      not confront those other issues.
      
      What sort of "incompatibilities" did you see on the
      Mac when replacing only the strtoul() routine in the
      internals of Tcl?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  13. Ticket change [3d2e6838e8] (rid 121042) by hobbs on 2002-02-23 14:00:14:

    1. assignee changed to: "dgp"
    2. icomment:
      Logged In: YES 
      user_id=72656
      
      can this be reverified on the latest sources following 
      dkf's latest set of patches?
      
      
    3. login: "hobbs"
    4. mimetype: "text/plain"
    5. username: "hobbs"
  14. Ticket change [ad6ee1daf1] (rid 101468) by dgp on 2002-02-24 05:20:21:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Things are .... different now.
      
      First let's just consider good old 32-bit Solaris.
      With current CVS HEAD sources (unpatched), if you
      force compat/strtoul.c to be compiled into Tcl, the
      resulting library has these test failures.
      
      ==== format-17.1 testing %d with wide FAILED
      ==== Contents of test case:
      
          list [catch {format %d 7810179016327718216} msg] $msg
      
      ---- Result was:
      0 1819043144
      ---- Result should have been (exact matching):
      1 {integer value too large to represent}
      ==== format-17.1 FAILED
      
      ==== lindex-4.2 index = end--1 FAILED
      ==== Contents of test case:
      
          set x end--1
          list [eval [list $lindex {a b c} $x]] [eval [list
      $lindex {a b c} $x]]
      
      ---- Result was:
      bad index "end--1": must be integer or end?-integer?
      ---- Result should have been (exact matching):
      {} {}
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ==== lindex-4.2 FAILED
      
      
      ==== lindex-12.2 index = end--1 FAILED
      ==== Contents of test case:
      
          set x end--1
          catch {
              list [lindex {a b c} $x] [lindex {a b c} $x]
          } result
          set result
      
      ---- Result was:
      bad index "end--1": must be integer or end?-integer?
      ---- Result should have been (exact matching):
      {} {}
      ==== lindex-12.2 FAILED
      
      ==== lset-4.5 lset, not compiled, 3 args, index out of range
      FAILED
      ==== Contents of test case:
      
          set a {x y z}
          list [catch {
              eval [list $lset a [list end--1] w]
          } msg] $msg
      
      ---- Result was:
      1 {bad index "end--1": must be integer or end?-integer?}
      ---- Result should have been (exact matching):
      1 {list index out of range}
      ==== lset-4.5 FAILED
      
      
      ==== lset-4.11 lset, not compiled, 3 args, index out of
      range FAILED
      ==== Contents of test case:
      
          set a {x y z}
          list [catch {
              eval [list $lset a end--1 w]
          } msg] $msg
      
      ---- Result was:
      1 {bad index "end--1": must be integer or end?-integer?}
      ---- Result should have been (exact matching):
      1 {list index out of range}
      ==== lset-4.11 FAILED
      
      
      ==== lset-8.9 lset, not compiled, second index out of range
      FAILED
      ==== Contents of test case:
      
          set a {{b c} {d e} {f g}}
          list [catch {eval [list $lset a 2 end--1 h]} msg] $msg
      
      ---- Result was:
      1 {bad index "end--1": must be integer or end?-integer?}
      ---- Result should have been (exact matching):
      1 {list index out of range}
      ==== lset-8.9 FAILED
      
      
      ==== lset-8.10 lset, not compiled, second index out of range
      FAILED
      ==== Contents of test case:
      
          set a {{b c} {d e} {f g}}
          list [catch {eval [list $lset a {2 end--1} h]} msg] $msg
      
      ---- Result was:
      1 {bad index "end--1": must be integer or end?-integer?}
      ---- Result should have been (exact matching):
      1 {list index out of range}
      ==== lset-8.10 FAILED
      
      ==== obj-31.3 regenerate string rep of "end--1" FAILED====
      Contents of test case:
      
          testobj freeallvars
          teststringobj set 1 end--0x1
          testobj convert 1 end-offset
          testobj invalidateStringRep 1
      
      ---- Result was:
      expected integer but got "--0x1"
      ---- Result should have been (exact matching):
      end--1
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ==== obj-31.3 FAILED
      
      ==== obj-31.5 regenerate string rep of "end--bigInteger" FAILED
      ==== Contents of test case:
      
          testobj freeallvars
          teststringobj set 1 end--0x7fffffff
          testobj convert 1 end-offset
          testobj invalidateStringRep 1
      
      ---- Result was:
      expected integer but got "--0x7fffffff"
      ---- Result should have been (exact matching):
      end--2147483647
      ---- Test generated error; Return code was: 1
      ---- Return code should have been one of: 0 2
      ==== obj-31.5 FAILED
      ==== scan-4.38 Tcl_ScanObjCmd, base-8 integer scanning FAILED
      ==== Contents of test case:
      
          set x {}
          list [scan {+1238 -1239 123a} {%o%*s%o%*s%o} x y z] $x $y $z
      
      ---- Result was:
      3 0 0 83
      ---- Result should have been (exact matching):
      3 83 -83 83
      ==== scan-4.38 FAILED
      
      ==== scan-4.39 Tcl_ScanObjCmd, base-16 integer scanning FAILED
      ==== Contents of test case:
      
          set x {}
          list [scan {+1238 -123a 0123} {%x%x%x} x y z] $x $y $z
      
      ---- Result was:
      3 0 0 291
      ---- Result should have been (exact matching):
      3 4664 -4666 291
      ==== scan-4.39 FAILED
      
      ==== scan-5.6 integer scanning FAILED
      ==== Contents of test case:
      
          set a {}; set b {}; set c {}; set d {}
          list [scan "ab123-24642" "%2x %3x %3o %2o" a b c d] $a
      $b $c $d
      
      ---- Result was:
      4 171 291 0 52
      ---- Result should have been (exact matching):
      4 171 291 -20 52
      ==== scan-5.6 FAILED
      
      ==== string-6.55 string is integer, false on overflow FAILED
      ==== Contents of test case:
      
          list [string is integer -fail var +[largest_int]0] $var
      
      ---- Result was:
      1 3
      ---- Result should have been (exact matching):
      0 -1
      ==== string-6.55 FAILED
      
      Things are event more broken on the Alpha, but
      let's get the simple case fixed first.
      
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  15. Ticket change [71bb8d987d] (rid 100737) by dgp on 2002-02-24 05:36:35:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Applying the first patch attached to this report
      fixes all but two of the failures:
      
      format-17.1
      string-6.55
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  16. Ticket change [a87d0948f1] (rid 99004) by dgp on 2002-02-24 06:31:28:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Note: I'm working up a patch that appears to solve
      all problems.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  17. Ticket change [a792283f23] (rid 98826) by dgp on 2002-02-24 09:51:34:

    1. assignee changed to: "das"
    2. icomment:
      Logged In: YES 
      user_id=80530
      
      Here's a patch that combines the best parts of all
      patches attached already, and fixes a few more things
      in the compat/strto*.c files to boot.
      
      Committing it now; Dan Steffen should check that it
      doesn't break anything on the Mac.
      
      
    3. login: "dgp"
    4. mimetype: "text/plain"
    5. resolution changed to: "Fixed"
    6. status changed to: "Closed"
    7. username: "dgp"
  18. Add attachment "strto.patch" [93145dcd01] (rid 105753) by dgp on 2002-02-24 09:51:35.

  19. Ticket change [3f64c0b0b3] (rid 121450) by dgp on 2002-02-24 09:51:35:

    1. closedate changed to: "2002-02-24T02:51:35"
    2. closer changed to: "dgp"
    3. icomment:
      
      
      File Added - 18313: strto.patch
      
      
      
    4. login: "dgp"
    5. mimetype: "text/plain"
    6. username: "dgp"