Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-06-06
23:52 • Closed ticket [3614382fff]: dict for exception handling: bad stack top plu... artifact: 5a5bc316d4 user: dgp
23:27 • Ticket [3614382fff]: 5 changes artifact: 60d6d7b0b4 user: dgp
14:12 • New ticket [3614382fff]. artifact: 77b34ea367 user: dgp

[dict for] exception handling: bad stack top

Closed / Fixed3614382fffffffffffffffffffffffffffffffffCreated 13 years agoUpdated 13 years ago
Descriptionplain2013-06-06 14:12:39
Using a --enable-symbols=all build of either the trunk,
or the 8.6.0 release:

$ cat demo.tcl
apply {{} {
    dict for {a b} {c d} {
dict for {e f} {g h} {
    return 5
}
    }
}}
$ make shell SCRIPT=demo.tcl
...
Bad stack top 4 at pc 104 in TclNRExecuteByteCode (min 0, max 3)
 executing dict for {e f} {g h} {
    return 5
}
TclNRExecuteByteCode execution failure: bad stack top
make: *** [shell] Abort trap
dgpplain2013-06-06 23:27:45
Here's another demo of the issue without the complication
of nesting loops:

apply {{} {
    dict for {a b} {c d} {
        apply {{} {return -level 2 5}}
    }
}}
dgpplain2013-06-06 23:52:15
allow_comments - 1

Moving the BEGIN_CATCH before the DICT_FIRST appears
to be an effective fix.  Committing to trunk.
Log in (anonymous is fine) to add a comment.