Artifacts Associated With Ticket 71c0878b71
Ticket change [6268839aff] (rid 152098) by anonymous on 2017-03-05 09:23:52:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "f37dff89f9b3009ee44e5c830135c3f0e1ac4a52"
- is_private initialized to: "0"
- login: "anonymous"
- priority initialized to: "5 Medium"
- private_contact initialized to: "0d5810a6d532ee60fe454fd2bdbe8e482821d713"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "anonymous"
- subsystem initialized to: "17. Commands I-L"
- title initialized to:
Strange results when second argument to [incr] is a list
- type initialized to: "Bug"
Ticket change [184af92d8d] (rid 152099) by avl42 on 2017-03-05 10:51:36:
- 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.
- login: "avl42"
- mimetype: "text/plain"
- username: "avl42"
- icomment:
Ticket change [1484e74dd0] (rid 152103) by avl42 on 2017-03-05 14:35:29:
- 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. - login: "avl42"
- mimetype: "text/plain"
- icomment:
Ticket change [73ae80dd38] (rid 152108) by avl42 on 2017-03-05 15:08:26:
- closedate changed to: "2457818.13086749"
- closer changed to: "avl42"
- icomment: "Fixed in commit 154835dcb2"
- login: "avl42"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [aca3b4b8f1] (rid 152109) by avl42 on 2017-03-05 15:47:06:
- closedate changed to: "2457818.15771227"
- 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". - login: "avl42"
- mimetype: "text/plain"