Skip to content
Tcl Source Code History Of Ticket 0842331eba
Login

History Of Ticket 0842331eba

Artifacts Associated With Ticket 0842331eba

  1. Ticket change [fb4399791c] (rid 199138) by anonymous on 2022-03-14 07:49:32:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      I'm seeing a platform dependency in the Tcl "scan" command when it comes to conversion of  oversized positive decimal numbers. According to the docs, "scan ... %d" is supposed to return the greatest integer value that makes sense - according to the given size modifiers. Without any size modifier (just %d) I'd expect to get a large positive number. But instead, I get this on a LP64 machine (x64 GNU/Linux):
      
      % info patchlevel
      8.6.4
      % set tcl_platform(wordSize)
      8
      % scan 11111111111111111111 %d
      -7335632962598440505
      
      ...whereas on a ILP32 machine (x86 GNU/Linux) I get this:
      % info patchlevel
      8.6.4
      % set tcl_platform(wordSize)
      4
      % scan 11111111111111111111 %d
      2147483647
      
      I've found old bug #1011860 [https://core.tcl-lang.org/tcl/tktview/1011860fffffffffffff], which seems to be related to this.
      
      What's going on here?
      
    5. foundin initialized to: "8.6.4"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "7059cfaad662ca85cba09bbf879f8783c497066b"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "23. [scan]"
    15. title initialized to: "[scan _ %d] 64-bit issue"
    16. type initialized to: "Bug"
  2. Ticket change [bb3128532a] (rid 199965) by chrstphrchvz on 2022-04-07 17:53:52:

    1. icomment:
      <blockquote>Without any size modifier (just <tt>%d</tt>) I'd expect to get a large positive number.</blockquote>
      
      The [https://www.tcl.tk/man/tcl8.6/TclCmd/scan.html#M7|documented behavior] of not specifying a size modifier is the same as using the <tt>h</tt> size modifier, which restricts the range to that of <tt>expr int(…)</tt> which is determined by <tt>$tcl_platform(wordSize)</tt>. The scan range is unlimited only when the <tt>ll</tt> size modifier is used.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [78652b1f6b] (rid 199968) by oehhar on 2022-04-07 19:27:20:

    1. icomment:
      Christopher,
      I enjoy to clicking "approve" for every valuable ticket you provide, it is a honor to do this small service ;-).
      But maybe, someone gives your user name "chrstphrchvz" at least comment rights, so the moderator approval is not necessary any more...
      Maybe, this might be ok for you ?
      
      Take care,
      Harald
      
    2. login: "oehhar"
    3. mimetype: "text/x-fossil-wiki"
    4. username: "oehhar"
  4. Ticket change [b8c65d2946] (rid 199969) by fvogel on 2022-04-07 22:00:46:

    1. icomment: "@oehhar: done."
    2. login: "fvogel"
    3. mimetype: "text/plain"
  5. Ticket change [4a3c033c5f] (rid 219209) by chrstphrchvz on 2023-10-09 20:30:42:

    1. closedate changed to: "2460227.35466329"
    2. closer changed to: "chrstphrchvz"
    3. login: "chrstphrchvz"
    4. mimetype: "text/x-fossil-wiki"
    5. resolution changed to: "Invalid"
    6. status changed to: "Closed"