Skip to content
Tcl Source Code View Ticket
Login

View Ticket

"info rename foo" crashes or exhausts Tcl stack in interacti

Closed / Fixed217997ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2000-10-26 00:51:48
OriginalBugID: 670 Bug
Version: 8.0.3
SubmitDate: '1998-08-20'
LastModified: '1998-09-30'
Severity: CRIT
Status: Closed
Submitter: rjohnson
ChangedBy: rjohnson
OS: All
OSVersion: NA
Machine: NA
FixedDate: '2000-10-25'
FixedInVersion: 8.0.3
ClosedDate: '1998-09-30'


There is some kind of weird interaction between the history mechanism (this is the prime suspect) and the info command that results in stack overflows in Tcl/Tk applications. The errors are platform dependent, on some platform you'll get a stack overflow crash, on other the dreaded "too many nested calls to Tcl_EvalObj (infinite loop?)" error. Also, how and when the bug is triggered is somewhat dependent on the platform and the application. Here's a few ways to trigger it:

on windows:
- start protclsh, then:
-- rename info foo
-- info abcd
- this causes a crash of protclsh, with exception 0xc00000fd (stack overflow)
- using "foo abcd" also causes the crash

- start prowish, then:
-- rename info foo
- this causes a crash of prowish, with exception 0xc00000fd (stack overflow)

on unix:
- start protclsh, then:
-- rename info foo
-- info abcd
- this gives you the "too many ..." error
- foo abcd works fine
- prowish shows the same behaviour.



The windows behavior has been improved to be the same as the UNIX behavior.  (in Tcl 8.0.3)

The UNIX behavior is correct.  Because part of Tcl is actually implemented in Tcl the user must be careful not to redefine any of the commands that Tcl it self relies on.  This would include things like "if", "info" and a handfull more.  rjohnson
welch Closed ticket [217997ffff]. [History diff]2000-10-26 08:12:11
dgp Ticket [217997ffff]: 4 changes [History diff]2001-04-16 23:03:19
Log in (anonymous is fine) to add a comment.