hidden commands missing full NRE support
Closed / Fixed2486550fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 13 years ago
Descriptionplain2009-01-04 22:28:03
% interp create slave slave % slave hide coroutine % slave invokehidden coroutine Segmentation fault same issue for any Command with a NULL objProc field
msoferplain2009-03-22 22:20:25
I see TclObjInvoke still does cmdPtr->objProc so that it will (a) not use the nreProc when present (b) fail for the few commands that have cmdProc=NULL: coroutine, yield, tailcall
dgpplain2009-03-22 22:31:40
see 2502002
msoferplain2009-03-23 00:40:18
I see TclObjInvoke still does cmdPtr->objProc so that it will (a) not use the nreProc when present (b) fail for the few commands that have cmdProc=NULL: coroutine, yield, tailcall
msoferplain2009-05-01 06:28:16
allow_comments - 1
dgpplain2009-05-06 22:49:20
allow_comments - 0 the commit stops the crash, but doesn't really "fix" TclObjInvoke fully (traces etc.). added test
dgpplain2013-04-09 00:35:54
I think this demonstrates the incompleteness
of the existing solution. (Possibly it's just
another bug):
% interp create slave
slave
% slave eval {proc myYield {} {yield}}
% slave hide myYield
% slave invokehidden myYield
yield can only be called in a coroutine
% interp alias slave Yield {} slave invokehidden myYield
Yield
% slave eval {coroutine X Yield}
make: *** [shell] Segmentation fault
dgp Ticket [2486550fff]: 2 changes
[History diff]2013-04-09 00:36:34
dgpplain2013-04-09 00:47:49
Appears to be both. Trouble with hidden command invocation will arise, but there's already trouble in place with aliases that cross interps too.
dgpplain2013-04-09 01:17:00
Here's the demo without two interps:
% interp hide {} yield
% coroutine X interp invokehidden {} yield
cannot yield: C stack busy
dkfplain2013-04-09 02:05:01
I suspect that we're not going to make yielding work across interps any time soon. It'd be cool, but the steps involved raise my "ooh, scary" hackles rather. "Don't crash" is about what I'd hope for...
dkfplain2013-04-09 02:06:13
And local invokehidden is such a strange special case that I'd be willing to let that not work too. Does anyone do that crazy stuff for real? (Crashes are bad though.)
dgpplain2013-04-11 21:40:43
Branch bug-2502002 now has a fix for the single interp demo case (which had a crash in it as well).
dgpplain2013-08-29 19:19:55
fixed on trunk.
Log in (anonymous is fine) to add a comment.