Skip to content
Tcl Source Code View Ticket
Login

View Ticket

{*} crashes interpreter on string that is not a valid list.

Closed / Fixed1638414fffffffffffffffffffffffffffffffffCreated 20 years agoUpdated 20 years ago
Descriptionplain2007-01-18 10:06:33
When replaying the following interactive session, the interpreter will crash on the second {*}

% set a "{foo bar"
% {*}$a
unmatched open brace in list
% {*}"{foo bar"
H:\>

Notice that {*} only crashes the interpreter when the string is put after {*} literally.

When using uplevel to do the same, the correct error is again shown, this might suggest it is TEBC related.

% uplevel 0 {{*}"\{foo bar"}
unmatched open brace in list


Tcl version info:

() 3 % info patchlevel
8.5a6
() 4 % parray tcl_platform
tcl_platform(byteOrder)   = littleEndian
tcl_platform(machine)     = intel
tcl_platform(os)          = Windows NT
tcl_platform(osVersion)   = 5.1
tcl_platform(platform)    = windows
tcl_platform(pointerSize) = 4
tcl_platform(threaded)    = 1
tcl_platform(user)        = nlv18296
tcl_platform(wordSize)    = 4
dkfplain2007-01-18 18:46:17
Logged In: YES 
user_id=79902
Originator: NO

This only crashes if all expansions in the command invokation were string literals that were bad scripts, the immediate cause of the crash being a missing INST_EXPAND_START from the bytecode stream. The real problem was a bad assumption in TclCompileScript, which was that TclMarkList would always succeed (obviously not a true assumption!)

All fixed.
dkf Ticket [1638414fff]: 1 change [History diff]2007-01-18 18:46:50
Log in (anonymous is fine) to add a comment.