Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2004-07-28
23:06 • Ticket [833150ffff] exception -> wrong length of cmd in stack status stil... artifact: c1cfee8160 user: dgp
23:06 • Closed ticket [833150ffff]. artifact: dc60f70cc0 user: dgp
2004-07-23
08:07 • Open ticket [833150ffff]. artifact: c665480778 user: dgp
2004-03-29
22:58 • Closed ticket [833150ffff]. artifact: 47cbdfc173 user: dgp
2004-03-28
06:26 • Ticket [833150ffff]: 4 changes artifact: 9304159cd3 user: dgp
06:06 • Ticket [833150ffff]: 4 changes artifact: ac9c19bd7a user: msofer
06:04 • Ticket [833150ffff]: 4 changes artifact: 6f2c6251ac user: dgp
2004-03-27
09:58 • Add attachment 833150.patch to ticket [833150ffff] artifact: de8ead279f user: msofer
09:58 • Ticket [833150ffff] exception -> wrong length of cmd in stack status stil... artifact: f5f64e11e7 user: msofer
09:58 • Ticket [833150ffff]: 5 changes artifact: 5486ca6e4d user: msofer
09:29 • Ticket [833150ffff]: 4 changes artifact: 6aba86755e user: msofer
2004-03-25
22:00 • Ticket [833150ffff]: 1 change artifact: 925e6b6e34 user: dkf
2003-10-30
15:53 • New ticket [833150ffff]. artifact: 71987bae05 user: dgp

exception -> wrong length of cmd in stack

Closed / Fixed833150ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2003-10-30 15:53:07
% continue
invoked "continue" outside of a loop
% set errorInfo
invoked "continue" outside of a loop
    while executing
"continue
"


Note the extra \n at the end of $errorInfo

Apparently Tcl_LogCommandInfo is being
passed an incorrect length.
dkf Ticket [833150ffff]: 1 change [History diff]2004-03-25 22:00:56
msoferplain2004-03-27 09:29:22
Logged In: YES 
user_id=148712

This is a consequence of line 467 in tclMain.c - the comment
explicitly says that a newline is to be added there. 
This behaviour is actually required by the test basic-46.1;
removing that line however causes failure of tests in
main.test (5.8, 5.11, 5.12, 9.1) and unixInit-1.2. So that
is not a correct fix ...
msoferplain2004-03-27 09:58:13
Logged In: YES 
user_id=148712

Attached a patch that fixes this issue and passes all tests
(after adapting basic-46.1).
I am not positive that this is a correct fix: what are all
the uses of TCL_ALLOW_EXCEPTIONS? Note that this flag value
is defined in tclInt.h and is (correctly) not documented in
doc/Eval.3
Please review.
msoferplain2004-03-27 09:58:14
File Added - 81541: 833150.patch
dgpplain2004-03-28 06:04:18
Logged In: YES 
user_id=80530


Thanks for looking into this.

I suspect the right fix is to
examine Tcl_Main and make
sure it's only appending \n
when it needs to.  I'll check
into that.
msoferplain2004-03-28 06:06:48
Logged In: YES 
user_id=148712

Actually, this patch feels very wrong. It is sure to cause
pain to embedders and/or extenders.
I'd rather say that this is not a bug (scripts run from the
console include the closing \n), or else it is a bug in
Tcl_Main (scripts run from the console should not include
the closing \n).
dgpplain2004-03-28 06:26:54
Logged In: YES 
user_id=80530

I have an elegant solution to this issue
that the margin is too small to
contain...
dgpplain2004-03-29 22:58:30
Logged In: YES 
user_id=80530


The \n is put back by Tcl_Main() only
to be sure it is present in multi-line
scripts.  It's not needed at the end of
a complete script.  Committing correction
to HEAD.

It's still a bit disappointing that line 3896
of tclBasic.c can't provide any more detail
than the whole toplevel script that raised
the exception, but that's probablty best
addressed in another report if it ever becomes
a real problem for someone.
dgpplain2004-07-23 08:07:07
Logged In: YES 
user_id=80530

backport this for 8.4.8
dgpplain2004-07-28 23:06:05
Logged In: YES 
user_id=80530

done
dgp Ticket [833150ffff]: 2 changes [History diff]2004-07-28 23:06:06
Log in (anonymous is fine) to add a comment.

Attachments: