Skip to content
Tcl Source Code History Of Ticket 991371ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 991371ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 991371ffffffffffffffffffffffffffffffffff

  1. Ticket change [1df2c999f4] (rid 90893) by bgriffin on 2004-07-15 05:59:38:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The format command errors out on %d of a wide int, but
      than converts the wide int to int so that subsequent
      format works without error.
      
      Place the following in a file "format_bug.tcl":
      
      set x [file size format_bug.tcl]
      
      puts stdout "First format:" 
      if {[catch {format "%d bytes" $x} res]} {
          puts stdout "Error: $res\nTrace back: $errorInfo" 
      } else {
          puts stdout $res
      } 
      
      puts stdout "Second format:" 
      if {[catch {format "%d bytes" $x} res]} {
          puts stdout "Error: $res\nTrace back: $errorInfo"
      } else {
          puts stdout $res
      } 
      
      Running the above code produces:
      
      First format: 
      Error: 
      Trace back:
          while executing 
      "format "%d bytes" $x" 
      Second format: 
      337 bytes
      
      
    4. foundin initialized to: "obsolete: 8.4.6"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "bgriffin"
    9. subsystem initialized to: "16. Commands A-H"
    10. title initialized to: "format problem with wide ints"
    11. type initialized to: "Bug"
  2. Ticket change [9ce4a0c070] (rid 96222) by bgriffin on 2004-07-15 13:01:14:

    1. icomment:
      Logged In: YES 
      user_id=22949
      
      I forgot to mention: This fails on 64-bit Solaris.
      
      
      
    2. login: "bgriffin"
    3. mimetype: "text/plain"
    4. username: "bgriffin"
  3. Ticket change [959bf6ab95] (rid 106184) by hobbs on 2004-07-16 01:34:02:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      This appears to be related to bug 699060 fixed in the 8.5
      head.  It needs to be backported as it clearly breaks on 8.4
      (not all 64-bit plats, but something is wrong).
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "hobbs"
  4. Ticket change [e62944ba7d] (rid 104251) by dgp on 2004-07-16 04:47:31:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      Report 699060 claims the fix
      went into Tcl 8.4.3 .
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  5. Ticket change [c7bef9744e] (rid 121992) by hobbs on 2004-07-16 04:51:38:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      It may, and 702622 appears to be in 8.4 as well, but that
      doesn't discount the fact that %[duxX] have different code
      between 8.4 and the head - there are no ChangeLog docs to
      really indicate why they should be so separate.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  6. Ticket change [f01575c434] (rid 109116) by dgp on 2004-07-16 05:22:19:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      Is this bug present in Tcl 8.4.2 ?
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  7. Ticket change [f4a99c1150] (rid 129957) by hobbs on 2004-07-16 11:31:53:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      I found that this:
      
      -    if (wideValue>ULONG_MAX || wideValue<LONG_MIN) {
      +    if (wideValue>LONG_MAX || wideValue<LONG_MIN) {
      
      at line 2209 of tclCmdAH.c:Tcl_FormatObjCmd made it work on
      Solaris-64, which indicates a sign extension bug in the
      compiler.
      Note that the above fix isn't actually correct code for this
      case (although I wonder whether we should be mingling
      unsigned checks for %d as well as the %[uoxX] this case covers).
      
      Also, a shorter test case is:
      
      et x [expr {wide(1)}]
      set code [catch {format "%d bytes" $x} res]
      puts "1st format ($code): $res"
      set code [catch {format "%d bytes" $x} res]
      puts "2nd format ($code): $res"
      
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  8. Ticket change [4b4fec1e69] (rid 126684) by bgriffin on 2004-07-16 12:21:53:

    1. icomment:
      Logged In: YES 
      user_id=22949
      
      Compiler bugs aside, I question why isn't %d automatically promoted to 
      %ld if/when Obj is a Wide int?  Otherwise, tcl programmers are forced to 
      concern themselves with type in a "typeless" language.  This doesn't 
      seem right to me.
      
      See, if the wide int was actually indeed larger than LONG_MAX (>32-
      bits) then an error would have been produced legitimately.  This means 
      at the tcl level one must concern themselves with %d vs %ld.  But these 
      notions were invented to deal with different types (int vs long).  Tcl is 
      not supposed to be "typed".
      
      
    2. login: "bgriffin"
    3. mimetype: "text/plain"
    4. username: "bgriffin"
  9. Ticket change [4982e38e9e] (rid 100065) by dkf on 2004-08-04 03:37:25:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      There are altogether too many ways for me to list right now
      in which I'm not satisfied with the current handling of
      64-bit values on 32-bit platforms. This is *not* the most
      surprising of them. :^(
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  10. Ticket change [a91d1f8f3f] (rid 99103) by dkf on 2004-09-11 05:39:07:

    1. status changed to: "Closed"
  11. Ticket change [c9d5bcc3dc] (rid 122355) by dkf on 2004-09-11 05:39:08:

    1. closedate changed to: "2004-09-10T22:39:08"
    2. closer changed to: "dkf"
    3. icomment:
      Logged In: YES 
      user_id=79902
      
      The fix for Bug 868489 seems to have cleared this up as well
      (or at least it all works for me now I've patched that.)
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. username: "dkf"