Skip to content
Tcl Source Code Artifact [a5b2538aa4]
Login

Artifact [a5b2538aa4]

Artifact a5b2538aa403d83ae89a59df13b93db12d49f5fe2c9a27238ac9785bdbf25799:

Ticket change [a5b2538aa4] - New ticket [723a2f4ac32c306a|723a2f4ac3] <i>return -code break/tailcall break from coroutine goes wrong at the top-level</i>. by aspect on 2018-07-31 13:11:32.
D 2018-07-31T13:11:32.681
J assignee nobody
J closer nobody
J cmimetype text/plain
J comment Depending\son\sthe\sset-up,\sthis\sseems\sto\sbe\ssensitive\seither\sto\sthe\scontext\sthe\scoroutine\sis\screated\sin\sor\sthe\scontext\sit\sis\scalled\sin.\s\sIf\sboth\shave\sat\sleast\sone\sframe\son\sthe\sstack,\sit\sworks\s"as\sexpected".\r\n\r\n\r\n%\sproc\sp0\s{}\s{yield;\sreturn\s-code\sbreak}\r\n%\scoroutine\sc0\sp0\r\n%\swhile\s1\sc0\r\ninvoked\s"break"\soutside\sof\sa\sloop\r\n\s\s\s\swhile\sexecuting\r\n"p0"\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"c0"\r\n\r\n%\sapply\s{{}\s{coroutine\sc0\sp0}}\r\n%\swhile\s1\sc0\r\n\r\n%\sproc\sp1\s{}\s{yield;\stailcall\sbreak}\r\n%\scoroutine\sc1\sp1\r\n%\swhile\s1\sc1\r\ninvoked\s"break"\soutside\sof\sa\sloop\r\n\s\s\s\swhile\sexecuting\r\n"break"\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"c1"\r\n\r\n%\scoroutine\sc1\sp1\r\n%\sapply\s{{}\s{while\s1\sc1}}\r\n\r\n\r\nAnother\sfun\sone:\r\n\r\n$\scat\sitop.tcl\r\nif\s1\s{coroutine\sc0\stry\s{yield;\sbreak}}\r\nwhile\s1\sc0\r\nputs\s"ok1"\r\n\r\ncoroutine\sc0\stry\s{yield;\sbreak}\r\nwhile\s1\sc0\r\nputs\s"ok2"\r\n\r\n$\stclsh\sitop.tcl\s\r\nok1\r\ninvoked\s"break"\soutside\sof\sa\sloop\r\n\s\s\s\swhile\sexecuting\r\n"try\s{yield;\sbreak}"\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"c0"\r\n\s\s\s\s("while"\sbody\sline\s1)\r\n\s\s\s\sinvoked\sfrom\swithin\r\n"while\s1\sc0"\r\n\s\s\s\s(file\s"itop.tcl"\sline\s6)\r\n\r\n\r\n(noticed\sby\spooryorick\son\sthe\schat\syesterday)
J is_private 0
J login aspect
J priority 5\sMedium
J resolution None
J severity Minor
J status Open
J submitter aspect
J subsystem 60.\sNRE\sand\scoroutines
J title return\s-code\sbreak/tailcall\sbreak\sfrom\scoroutine\sgoes\swrong\sat\sthe\stop-level
J type Bug
K 723a2f4ac32c306a16919568acaf0b78304dea7d
U aspect
Z bd17c2dcab6f8b1e9b4a5240ff997904