Artifacts Associated With Ticket 21ba1dc8a3
Ticket change [ae9768aeea] (rid 261766) by dgp on 2026-11-16 14:36:46:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
$ make test-tcl TESTFLAGS='-singleproc 1 -file "trace.test while-old.test" -match "trace-34.7 while-old-4.6"' ... Tests began at 2026-11-16 09:35:52 EST trace.test while-old.test ==== while-old-4.6 errors in while loops FAILED ==== Contents of test case: set err [catch {while {1} {error "loop aborted"}} msg] list $err $msg $::errorInfo ---- Result was: 1 {loop aborted} {loop aborted while executing "error "loop aborted"" ("while" body line 1) invoked from within "while {1} {error "loop aborted"}"} ---- Result should have been (exact matching): 1 {loop aborted} {loop aborted while executing "error "loop aborted""} ==== while-old-4.6 FAILED Tests ended at 2026-11-16 09:35:52 EST - foundin initialized to: "9.0"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "46. Traces"
- title initialized to:
-singleproc 1 testing conflict trace-34.7 while-old-4.6
- type initialized to: "Bug"
Ticket change [ffe1a2fb2e] (rid 262120) by dgp on 2026-11-25 17:04:33:
- icomment:
The symptoms here are due to an exposure of another bug. The stack trace generated by an error in a [while] body is different whether or not [while] was executed as bytecode or whether it was directly evaluated. See this demonstration: % catch {while 1 {error boom}} m o; dict get $o -errorinfo boom while executing "error boom" % set while while while % catch {$while 1 {error boom}} m o; dict get $o -errorinfo boom while executing "error boom" ("while" body line 1) invoked from within "$while 1 {error boom}" This alone is a bug. Everything Is A String rules should compel the two scripts, which are string equal after substitution, to produce identical results. Said another way, bytecode execution is not supposed to produce variant outcomes. The test while-old-4.6 is explicitly demanding the behavior that bytecode execution follows. Something about the new test trace-34.7 is lingering in the interp a long time over the course of many intervening tests and causing the [while] command to follow the direct eval path, which fails the test. - login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [1b9660246f] (rid 262121) by dgp on 2026-11-25 17:12:48:
- icomment:
For now, I will be satisfied if we determine what residue the test trace-34.7 is leaving behind in the interp, and make it clean up after itself, so we restore the -singleproc 1 testing mode to a failure-free `make test`. If it helps, it appears the interp changes state and exhibits the failing behavior after the second [foo] command in the test body of trace-34.7. We can then address the longstanding mismatch between error stack generation by bytecoded [while] and direct evaluation of [while] as a separate bug.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [9498c3463a] (rid 263166) by serhiy.storchaka on 2026-11-26 16:20:19:
- foundin changed to: "8.6.18, 9.0.5, 9.1.1"
- icomment:
The trace leaves the interp unable to compile commands inline: TraceExecutionProc() restores the whole iPtr->flags after the callback, so when the callback deletes the last step trace, the DONT_COMPILE_CMDS_INLINE flag cleared by Tcl_DeleteTrace() is set again. Since at least 8.5. Proposed fix in branch [/timeline?r=step-trace-inline-flag|step-trace-inline-flag]: restore only INTERP_TRACE_IN_PROGRESS. Test trace-34.8.
- login: "serhiy.storchaka"
- mimetype: "text/x-fossil-wiki"