Artifacts Associated With Ticket 60559fd4a6
Ticket change [679c5a86f8] (rid 171002) by dgp on 2019-04-11 16:02:52:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
$ make test-tcl TESTFLAGS='-singleproc -file "coroutine.test info.test" -match "coroutine-7.6 info-23.0.1"' ... ==== info-23.0.1 eval'd info frame FAILED ==== Contents of test case: eval {info frame} ---- Result was: 13 ---- Result should have been (glob matching): 1[12] ==== info-23.0.1 FAILED - foundin initialized to: "8.6+"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "-singleproc + coroutine-7.6 + info-23.0.1 => fail"
- type initialized to: "Bug"
Ticket change [473c12ef52] (rid 171003) by dgp on 2019-04-11 16:53:11:
- icomment:
Bisecting says then unhappiness starts here: https://core.tcl-lang.org/tcl/info/0c54ff4afafe9fe2
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [378d594fa2] (rid 171004) by dkf on 2019-04-11 18:32:41:
- icomment:
Seems to be an inconsistent state somewhere. Here's an illustrative interactive session: <pre> % info frame 1 % eval { proc foo args {} trace add execution foo enter {catch yield} coroutine demo foo rename foo {} } % info frame 1 % eval { info frame } 2 % eval { proc foo args {} trace add execution foo enter {catch yield} coroutine demo foo rename foo {} info frame } 3 </pre> - login: "dkf"
- mimetype: "text/html"
- priority changed to: "6"
- icomment:
Ticket change [a0f3b1054e] (rid 171005) by dkf on 2019-04-11 19:28:49:
- icomment:
The following test case (<i>provisionally</i> named) shows that this has nothing to do with coroutines. It does have plenty to do with <code>foo</code> having a direct <code>compileProc</code> (special case to allow disabling logging/asserts). <pre> test coroutine-7.6a {Early yield crashes} -setup { set result {} } -body { proc foo args {} set BaseFrameLevel [info frame] eval { lappend result [expr {[info frame] - $BaseFrameLevel}] trace add execution foo enter list lappend result [expr {[info frame] - $BaseFrameLevel}] } } -cleanup { rename foo {} unset -nocomplain result BaseFrameLevel } -result {1 1} </pre> This is weird stuff! - login: "dkf"
- mimetype: "text/html"
- icomment:
Ticket change [c38b45213e] (rid 171020) by sebres on 2019-04-11 20:58:46:
- icomment:
It looks like the epoch-bump (with followed re-compilation) is indirectly responsible for this disaster: <code><pre> set result {} proc bar args {} proc foo args {} set BaseFrameLevel [info frame] eval { lappend result [expr {[info frame] - $BaseFrameLevel}] [regexp -inline {^\S+} [dict get [info frame -1] cmd]] rename bar buz; ## ********** change of compileEpoch. lappend result [expr {[info frame] - $BaseFrameLevel}] [regexp -inline {^\S+} [dict get [info frame -1] cmd]] puts $result } set result {} eval { lappend result [expr {[info frame] - $BaseFrameLevel}] [regexp -inline {^\S+} [dict get [info frame -1] cmd]] rename buz bar; ## ********** change of compileEpoch. lappend result [expr {[info frame] - $BaseFrameLevel}] [regexp -inline {^\S+} [dict get [info frame -1] cmd]] puts $result } </pre></code> So interpreter tracing is not involved. - login: "sebres"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [bb65d8b34e] (rid 171021) by dkf on 2019-04-11 21:39:09:
- icomment:
It's totally the epoch bump. That pushes that stack frame's evaluation engine into a state where it uses interpretation instead of compilation until the frame is purged, which is a long time away for the global stack frame in a <code>-singleproc 1</code> situation (longer than in 8.5; 8.6 compiles more aggressively for good NRE-support reasons), and interpretation sees more frames in <code>info frame</code> than compilation. <p> This is evil evil evil, and not a bug that we should fix. Except for the tests being too keen on triggering the bump. The tests that cause the problem (that I've seen; there might be more) are <code>coroutine-7.6</code> and <code>coroutine-7.7</code>.
- login: "dkf"
- mimetype: "text/html"
- icomment:
Ticket change [f887586604] (rid 171026) by dkf on 2019-04-11 21:41:55:
- icomment:
See [https://core.tcl-lang.org/tcl/timeline?r=bug-60559fd4a6] for what I think the fix should be.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [fd17ecad7d] (rid 171066) by dgp on 2019-04-17 15:09:51:
- assignee changed to: "dgp"
- closedate changed to: "2458591.13184122"
- closer changed to: "dgp"
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"