Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-04-03
02:51 • Ticket [2433843fff] return options can leak to next bytecode status still Op... artifact: 320738a7bf user: dgp
2008-12-17
00:00 • Ticket [2433843fff]: 1 change artifact: db77912805 user: dgp
2008-12-16
16:41 • New ticket [2433843fff]. artifact: 49f590a984 user: dgp

return options can leak to next bytecode

Open2433843fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-12-16 16:41:41
% proc demo {} {
    return -level 0 -code ok -leaky option
    set x
}
% catch demo m o
1
% set o
-leaky option -code 1 -level 0 -errorcode NONE -errorinfo {can't read "x": no such variable
    while executing
"set x"
    (procedure "demo" line 3)
    invoked from within
"demo"} -errorline 1
% info patch
8.5.5


Problem appears to be that all commands
returning TCL_OK bypass any (emulation of)
Tcl_ResetResult() on the theory that results
are managed on the execution stack so long
as bytecode is in control.  This means
resetting of the return options dict gets
skipped.
dgp Ticket [2433843fff]: 1 change [History diff]2008-12-17 00:00:21
dgpplain2009-04-03 02:51:19
see also 2007198
Log in (anonymous is fine) to add a comment.