#3782 hidden bgerror fallback gets wrong stack

obsolete: 8.5a6
closed-fixed
5
2007-09-07
2007-09-07
Anonymous
No

Works in 8.4.16:

% info patch
8.4.16
% interp create -safe safe
safe
% interp alias safe puts {} puts
puts
% safe eval {proc bgerror m {puts $m\n$::errorCode\n$::errorInfo}}
% safe eval after 0 error foo
after#0
% update
foo
NONE
foo
while executing
"error foo"
("after" script)
% interp hide safe bgerror
% safe eval after 0 error foo
after#1
% update
foo
NONE
foo
while executing
"error foo"
("after" script)

Broken in 8.5a6 (and HEAD):

% info patch
8.5a6
% interp create -safe safe
safe
% interp alias safe puts {} puts
puts
% safe eval {proc bgerror m {puts $m\n$::errorCode\n$::errorInfo}}
% safe eval after 0 error foo
after#0
% update
foo
NONE
foo
while executing
"error foo"
("after" script)
% interp hide safe bgerror
% safe eval after 0 error foo
after#1
% update
foo
NONE
invalid command name "bgerror"
while executing
"bgerror foo"

Discussion

  • Don Porter

    Don Porter - 2007-09-07
    • assigned_to: nijtmans --> dgp
     
  • Don Porter

    Don Porter - 2007-09-07

    Logged In: YES
    user_id=80530
    Originator: NO

    This variation shows that 8.4 has
    a bug as well:

    % interp create -safe safe
    safe
    % interp alias safe puts {} puts
    puts
    % safe eval {proc bgerror m {puts $m\n$::errorCode\n$::errorInfo}}
    % interp hide safe bgerror
    % safe eval after 0 error foo
    after#0
    % update
    foo
    NONE
    foo
    while executing
    "error foo"
    ("after" script)
    % safe eval {proc bgerror m {error bar grok baz}}
    % safe eval after 0 error foo
    after#1
    % update
    foo
    baz
    grok
    (procedure "bgerror" line 1)
    invoked from within
    "bgerror foo"

     
  • Don Porter

    Don Porter - 2007-09-07
    • status: open --> closed-fixed
     
  • Don Porter

    Don Porter - 2007-09-07

    Logged In: YES
    user_id=80530
    Originator: NO

    Committing attached patch to
    HEAD as a fix.

    Patch uses routines available
    only in 8.5, so no backport.
    Unless someone re-opens, consider
    this a "Won't fix" on the 8.4 branch.

     

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

Sign up for the SourceForge newsletter:





No, thanks