Artifacts Associated With Ticket 2824981fffffffff
Ticket change [b39ea1ae51] (rid 124888) by zbigniew_b on 2009-07-21 19:47:09:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
It seems, that "rename" command is faulty - by trying, as example: % rename set asd % asd a 0 ...one can see, that any other input is impossible, while CPU is at full power. Tested on Linux. Test with tclsh8.5 revealed no such problem, but still another one: $tclsh8.5 % rename set asd % asd a 1 1 % asd b 2 2 % set a 1 too many nested evaluations (infinite loop?) ...and since this time, every try to run any other non-existing command is answered with "too many nested evaluations (infinite loop?)" instead of with usual "invalid command name".
- foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "zbigniew_b"
- subsystem initialized to: "18. Commands M-Z"
- title initialized to: ""Rename" spoiled in 8.6b1 (and probably in 8.5)"
- type initialized to: "Bug"
Ticket change [b4f2f57620] (rid 125143) by msofer on 2009-07-22 04:24:36:
- icomment:
The 8.5 behaviour is correct - it is a consequence of your breaking [unknown] (which uses [set]) by not providing a reasonable implementation of [set]. This causes [unknown] to call itself recursively. Not sure yet about what is happening with 8.6
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [3677014633] (rid 107106) by msofer on 2009-07-22 06:47:10:
- icomment:
8.6 seems to be miscounting recursion levels from [unknown] proc history args {} rename set xx set x 1 enters a busy loop and never hits the recursion limit. - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [69b8307b39] (rid 103301) by dkf on 2009-07-22 12:41:38:
- assignee changed to: "msofer"
Ticket change [dc1adad403] (rid 108072) by msofer on 2009-12-11 10:29:58:
- foundin changed to: "obsolete: 8.6b1.1"
- icomment:
still present
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "msofer"
Ticket change [01f376dc2d] (rid 119571) by dkf on 2009-12-30 00:11:51:
- icomment:
Updated title to be more descriptive of the real issue
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [d5ea519413] (rid 123717) by dkf on 2009-12-30 00:11:52:
- title changed to:
lack of [set] causes infinite loop through [unknown]
- title changed to:
Ticket change [5300556018] (rid 126410) by msofer on 2009-12-30 20:52:27:
- icomment:
The problem with [unknown] is now fixed in HEAD: errors in setting two variables were [catch]ed, so that the infinite loop was not being detected. Bug kept open because there is a deeper problem: this behaviour should NOT be triggerable with a plain script, infinite recursion of the unknown handler should never happen.
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "msofer"
- icomment:
Ticket change [6f60990762] (rid 100307) by dgp on 2012-01-27 21:32:42:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.5.11"
- icomment:
This bug fix didn't get backported to 8.5.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- subsystem changed to: "38. Init - Library - Autoload"
- username: "dgp"
Ticket change [5cfcd75c74] (rid 115387) by msofer on 2012-01-27 21:37:57:
- icomment:
The fix was for the 8.6 behaviour (busy loop at 100% cpu), which does not happen in 8.5 The deeper bug (recursive calling of unknown) is present in both ... and possibly since the dawn of time.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [a6e7fd0bcb] (rid 98690) by dgp on 2012-01-27 21:42:35:
- icomment:
Help me out. Was the busy loop behavior fixed, or avoided?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [59251cef75] (rid 117927) by msofer on 2012-01-27 22:07:09:
- icomment:
The infinite loop in [unknown] happens when there is an unknown command in the body of [unknown] itself. Still there. The bug in 8.6 was that that particular infinite loop was not being counted as a nesting level, so that "too many nested evaluations" was never triggered. The patch http://core.tcl.tk/tcl/ci/0c8502aa1f?sbs=1 just allows differentiating errors: is it that errorInfo does not exist? Or rather that [set] is not defined? The first should keep going, the second should recursively call [unknown] outside of a [catch]. That is fixed now. I forget now why that diff seems not to be important in 8.5 :(
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [f28b37479e] (rid 109563) by dgp on 2012-01-27 22:10:34:
- icomment:
I'm still puzzled. Why is it that the same code in 8.5 and 8.6 has its nesting levels counted differently?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [e0f43d092c] (rid 87361) by sebres on 2012-01-27 23:24:14:
- icomment:
the command "set" that used in "unknown" is not available - also call "unknown" again and again ... 8.6b % puts [regexp -inline {(?:[^\n]*\n){1,6}} $::errorInfo] {too many nested evaluations (infinite loop?) while executing "set savedErrorInfo $::errorInfo" (procedure "::unknown" line 7) invoked from within "set savedErrorInfo $::errorInfo" } 8.5.11 % puts [regexp -inline {(?:[^\n]*\n){1,6}} $::errorInfo] {too many nested evaluations (infinite loop?) while executing "set cmd [lindex $args 0]" (procedure "::unknown" line 8) invoked from within "set cmd [lindex $args 0]" } - login: "sebres"
- mimetype: "text/plain"
- username: "sebres"
- icomment:
Ticket change [bd3ebfc976] (rid 101878) by dgp on 2012-01-27 23:43:37:
- icomment:
New bug 3480592 demonstrates the core real issue of how a busy loop can be created the evades inf recursion detection. It avoids all potentialy confusing interactions with ::error* variables and the unknown mechanism.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [30a39c4e72] (rid 93291) by dgp on 2012-01-28 00:09:34:
- icomment:
FWIW, the reason the problem arose in Tcl 8.6 is that we removed "Aunt Millie" from [::unknown]. She was using [set] before the [catch {set ...}] that came later, which avoided the Houdini structure. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [30459f3239] (rid 93218) by ferrieux on 2012-05-11 04:20:32:
- icomment:
Doesn't look like a showstopper. Lowering prio.
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "ferrieux"
- icomment:
Ticket change [f2710ba5a9] (rid 257770) by serhiy.storchaka on 2026-10-12 17:47:52:
- icomment:
The busy loop was fixed in [0c8502aa1f]. In 8.6.18, 9.0 and 9.1, after <code>rename set asd</code> an unknown command fails at once with "too many nested evaluations (infinite loop?)", as in 8.5. This is the expected result of removing a command that <code>unknown</code> uses; the remaining case [3480592] was closed as not a bug.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- icomment:
Ticket change [1988d92ae9] (rid 259892) by serhiy.storchaka on 2026-10-22 17:19:24:
- closedate changed to: "2461326.2415741896"
- closer changed to: "serhiy.storchaka"
- login: "serhiy.storchaka"