|
2026-10-20
| ||
| 21:11 | • Ticket [a63f5a4fed] Safe interp gets the parent's -errorinfo and -errorstack... artifact: 60b4c1556c user: jan.nijtmans | |
|
2026-10-17
| ||
| 10:53 | • Ticket [219164ffff] various aspects of error handling fail with interp aliases</... artifact: 313a2420dd user: serhiy.storchaka | |
|
2008-06-28
| ||
| 21:22 | • Ticket [219164ffff]: 1 change artifact: e959fc3dd3 user: msofer | |
|
2004-11-04
| ||
| 07:39 | • Ticket [219164ffff]: 4 changes artifact: e173599aeb user: dgp | |
|
2004-05-22
| ||
| 06:57 | • Ticket [219164ffff]: 6 changes artifact: a614faa13d user: msofer | |
|
2001-09-08
| ||
| 06:11 | • Ticket [219164ffff]: 1 change artifact: 802897be13 user: andreas_kupries | |
|
2001-01-31
| ||
| 17:48 | • Ticket [219164ffff]: 1 change artifact: 4ce76d8fbe user: dkf | |
|
2000-10-26
| ||
| 05:02 | • New ticket [219164ffff]. artifact: 171bf0e408 user: nobody | |
various aspects of error handling fail with interp aliases
Open219164ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 46 days ago
Descriptionplain2000-10-26 05:02:42
OriginalBugID: 1637 Bug
Version: 8.1b2
SubmitDate: '1999-03-25'
LastModified: '1999-10-26'
Severity: MED
Status: Assigned
Submitter: stanton
ChangedBy: hershey
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'
There are several bugs in interp.test that are marked as "knownBug". These should be fixed:
test interp-26.4 {result code transmission: invoke hidden direct} {knownBug} {
# The known bug is that code 2 is returned, not the -code argument
catch {interp delete a}
interp create a
set res {}
interp hide a return
for {set code -1} {$code<=5} {incr code} {
lappend res [catch {interp invokehidden a return -code $code ret$code}]
}
interp delete a
set res
} {-1 0 1 2 3 4 5}
test interp-26.5 {result code transmission: invoke hidden indirect} {knownBug} {
# The known bug is that the break and continue should raise errors
# that they are used outside a loop.
catch {interp delete a}
interp create a
set res {}
interp eval a {proc retcode {code} {return -code $code ret$code}}
interp hide a retcode
for {set code -1} {$code<=5} {incr code} {
lappend res [catch {interp invokehidden a retcode $code} msg] $msg
}
interp delete a
set res
} {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5}
test interp-26.6 {result code transmission: all combined} {knownBug} {
# Test that all the possibles error codes from Tcl get passed
# In both directions. This doesn't work.
set interp [interp create];
proc MyTestAlias {interp args} {
global aliasTrace;
lappend aliasTrace $args;
eval interp invokehidden [list $interp] $args
}
foreach c {return} {
interp hide $interp $c;
interp alias $interp $c {} MyTestAlias $interp $c;
}
interp eval $interp {proc ret {code} {return -code $code ret$code}}
set res {}
set aliasTrace {}
for {set code -1} {$code<=5} {incr code} {
lappend res [catch {interp eval $interp ret $code} msg] $msg
}
interp delete $interp;
set res
} {-1 ret-1 0 ret0 1 ret1 0 ret2 3 ret3 4 ret4 5 ret5}
test interp-26.8 {errorInfo transmission: safe interps} {knownBug} {
# this test fails because the errorInfo is fully transmitted
# whether the interp is safe or not. The errorInfo should never
# report data from the master interpreter because it could
# contain sensitive information.
set interp [interp create -safe];
proc MyError {secret} {
return -code error "msg"
}
proc MyTestAlias {interp args} {
MyError "some secret"
}
interp alias $interp test {} MyTestAlias $interp;
set res [interp eval $interp {catch test;set errorInfo}]
interp delete $interp;
set res
} {msg
while executing
"test"}
Referenced by1
60b4c1556cTicket [a63f5a4fed] Safe interp gets the parent's -errorinfo and -errorstack through a failing alias status still Open with 6 other changes ticket2026-10-20 21:11:13
dkf Ticket [219164ffff]: 1 change
[History diff]2001-01-31 17:48:55
andreas_kupries Ticket [219164ffff]: 1 change
[History diff]2001-09-08 06:11:16
msoferplain2004-05-22 06:57:22
Logged In: YES
user_id=148712
Found this oldie while grepping for {knownBug}; assigning to
myself so that I remember to take a look.
dgpplain2004-11-04 07:39:37
Logged In: YES user_id=80530 got a good idea on how to "fix" these problems, if in fact we can agree these are really bugs.
msofer Ticket [219164ffff]: 1 change
[History diff]2008-06-28 21:22:10
serhiy.storchakawiki2026-10-17 10:53:34
interp-26.8 (the parent's errorInfo and errorstack leaking into a safe interp through an alias) is now tracked separately in [a63f5a4fed].
Log in (anonymous is fine) to add a comment.