#4222 return options can leak to next bytecode

obsolete: 8.5.5
open
5
2008-12-16
2008-12-16
Don Porter
No

% 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.

Discussion

  • Don Porter

    Don Porter - 2008-12-16
    • assigned_to: msofer --> dgp
     
  • Don Porter

    Don Porter - 2009-04-02

    see also 2007198

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks