Artifacts Associated With Ticket 3610393fffffffffffffffffffffffffffffffff
Ticket change [bb8ec40ddd] (rid 129508) by dgp on 2013-04-09 17:12:08:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
oo::object create foo oo::objdefine foo { method target {} {puts Hit!} forward bar my target } proc harness {} { foo target foo bar } proc handle {cmd args} { puts "Command [lindex $cmd 0] resolves to:" puts "\t'[uplevel 1 [list ::namespace which -command [lindex $cmd 0]]]'" puts "\t\tResolved at level [uplevel 1 {info level}]" } trace add execution harness enterstep handle harness Output: Command foo resolves to: '::foo' Resolved at level 1 Command puts resolves to: '::puts' Resolved at level 2 Hit! Command foo resolves to: '::foo' Resolved at level 1 Command my resolves to: '' Resolved at level 1 Command puts resolves to: '::puts' Resolved at level 2 Hit! The problem is that [my] is an execution-trace-able command, but the context in which it is executed does not match the expectations of execution trace handlers. The CallFrame establishing the namespace context for command resolution is missing. - foundin initialized to: "current: 8.6.0"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "35. TclOO Package"
- title initialized to: "forwards clash with execution traces"
- type initialized to: "Bug"
Ticket change [9e1baefcf7] (rid 96423) by dgp on 2013-04-10 00:38:45:
- icomment:
The simple-minded fix -- put in the missing push/pop of a stack frame -- makes the oo part of the test suite *very* unhappy.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [763a6139b4] (rid 105541) by dgp on 2013-04-10 00:40:10:
- icomment:
Alternative approach might be to declare that forwards are special in some way, and ought to be invisible to execution tracing, and that's the real bug to fix. Would want to check how ensemble and alias redirection behave on that matter.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f257f4535b] (rid 109522) by dkf on 2013-04-10 01:50:42:
- icomment:
The bug is in the implementation of the specific execution trace; it is assuming that it can resolve the command simply. This is not necessarily true of any command that is invoked via TclNREvalObjv, as that interface allows the supply of the resolved command. Pushing an extra frame just to make your traces happy is very expensive for everything else (and likely to run into all sorts of problems with the extra frame to pass over in [uplevel]/[upvar]). Very tempted to close as a Wont Fix. It's certainly not a high priority to tinker with.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- username: "dkf"
- icomment:
Ticket change [18c9989a1a] (rid 122721) by dgp on 2013-04-10 01:59:06:
- icomment:
Potential defects in the TclNREvalObjv interface is exactly the issue I'm investigating.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "5 Medium"
- username: "dgp"
- icomment:
Ticket change [b860c9acbf] (rid 133395) by dkf on 2013-08-21 09:41:04:
- closer changed to: "nobody"
- comment changed to:
oo::object create foo oo::objdefine foo { method target {} {puts Hit!} forward bar my target } proc harness {} { foo target foo bar } proc handle {cmd args} { puts "Command [lindex $cmd 0] resolves to:" puts "\t'[uplevel 1 [list ::namespace which -command [lindex $cmd 0]]]'" puts "\t\tResolved at level [uplevel 1 {info level}]" } trace add execution harness enterstep handle harness Output: Command foo resolves to: '::foo' Resolved at level 1 Command puts resolves to: '::puts' Resolved at level 2 Hit! Command foo resolves to: '::foo' Resolved at level 1 Command my resolves to: '' Resolved at level 1 Command puts resolves to: '::puts' Resolved at level 2 Hit! The problem is that [my] is an execution-trace-able command, but the context in which it is executed does not match the expectations of execution trace handlers. The CallFrame establishing the namespace context for command resolution is missing. - icomment:
I would like this fixed, but don't know what to do about it.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- priority changed to: "6"
- severity changed to: "Minor"
- username: "dkf"
Ticket change [f57a5c961b] (rid 139910) by dkf on 2014-09-14 16:37:00:
- assignee changed to: "dgp"
- icomment:
Sorry to drop this back onto you, but I've no idea what to do about it.
- login: "dkf"
- mimetype: "text/html"
Ticket change [65f34387cd] (rid 139918) by dgp on 2014-09-14 18:16:18:
- icomment:
I expect that most or all of the answer will come in the fix for http://core.tcl.tk/tcl/tktview?name=3610400
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [2e608d90cc] (rid 162273) by dgp on 2018-04-06 16:37:21:
- icomment: "ping"
- login: "dgp"
- mimetype: "text/plain"
Ticket change [98c53bf181] (rid 226500) by dkf on 2024-05-23 11:35:23:
- closedate changed to: "2460453.98290696"
- closer changed to: "dkf"
- icomment:
Closing in favour of [3610400] which should resolve this once we know how to do so. The base issue is that the trace is assuming that the caller frame is the resolution context, and that's not true with forwards or tailcalls. It probably also isn't true with aliases in some cases.
- login: "dkf"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Duplicate"
- status changed to: "Closed"