Skip to content
Tcl Source Code History Of Ticket 71c0878b71
Login

History Of Ticket 71c0878b71

Artifacts Associated With Ticket 71c0878b71

  1. Ticket change [6268839aff] (rid 152098) by anonymous on 2017-03-05 09:23:52:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      First case (the variable "var" does not exist):
          % incr var {1 2}
          --> expected integer but got "1 2"
      This is the expected result.
      
      Second case (the variable "var" does not exist):
          % incr var [list 1 2]
          --> can't read "var": no such variable
      The error message is very misleading, as for [incr] the variable needs not to exist.
      
      Third case: this time we create "var" before [incr]easing it:
          % set var 1
          --> 1
          % incr var [list 1 2]
          --> 
          % set errorInfo
      
              (reading increment)
              invoked from within
          "incr var [list 1 2]"
      In this case the error message is the empty string.
      
      The problem does not show in 8.6.6
      
    5. foundin initialized to: "f37dff89f9b3009ee44e5c830135c3f0e1ac4a52"
    6. is_private initialized to: "0"
    7. login: "anonymous"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "0d5810a6d532ee60fe454fd2bdbe8e482821d713"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "anonymous"
    14. subsystem initialized to: "17. Commands I-L"
    15. title initialized to:
      Strange results when second argument to [incr] is a list
      
    16. type initialized to: "Bug"
  2. Ticket change [184af92d8d] (rid 152099) by avl42 on 2017-03-05 10:51:36:

    1. icomment:
      bisecting points to commit b4792ebcec7a8473 
      
      " Shortcut in TclParseNumber(): If obj is a dict or list,
      " don't bother to generate the string representation if we know already
      " beforehand that the parsing will fail. Use TCL_NO_DEPRECATED in stead
      " of KILL_OCTAL for removing the (deprecated un-prefixed) octal support.
      " Adapt test-cases, so they work without octal support as well.
      
    2. login: "avl42"
    3. mimetype: "text/plain"
    4. username: "avl42"
  3. Ticket change [1484e74dd0] (rid 152103) by avl42 on 2017-03-05 14:35:29:

    1. icomment:
      Maybe that's obvious, anyway, but the new code to detect definitely-not-numbers only returns TCL_ERROR but doesn't set an error result string. The consequence is  that eventually a previously suppressed error resurfaces, or just an empty string.
      
      For full correctness, we would need to ensure the same error message on a pure list/dict than on its canonical string rep. Fortunately, we only need to do this, if the interp is non-NULL, so the intended speed-up for tryCvtToNumeric isn't affected, as it already passes NULL for the interp.
      
      My suggested fix would be to change line 542 ("if (endPtrPtr ...") to "if (interp==NULL && endPtrPtr == NULL) ...". If there is an interp, we need an authentic error diagnose, so can't shortcut.
      
    2. login: "avl42"
    3. mimetype: "text/plain"
  4. Ticket change [73ae80dd38] (rid 152108) by avl42 on 2017-03-05 15:08:26:

    1. closedate changed to: "2457818.13086749"
    2. closer changed to: "avl42"
    3. icomment: "Fixed in commit 154835dcb2"
    4. login: "avl42"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
  5. Ticket change [aca3b4b8f1] (rid 152109) by avl42 on 2017-03-05 15:47:06:

    1. closedate changed to: "2457818.15771227"
    2. icomment:
      Afternote: the fix preserves the optimisations for tryCvtToNumeric:
      
         % set x [lrepeat 1000000 "*"]; set y [lrepeat 1000000 $x]; llength $y
         1000000
         % llength [expr {$y}]
         1000000
      
      Without the optimisation this crashes with "max size for a Tcl value (2147483647 bytes) exceeded".
      
    3. login: "avl42"
    4. mimetype: "text/plain"