Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Misleading -errorinfo from syntax error

Closed / Fixed1c17fbba5dc8313f0336195eb16b451cff4aace2Created 13 years agoUpdated 13 years ago
Descriptionplain2013-07-18 13:14:59
% set {}.
extra characters after close-brace
% set errorInfo
extra characters after close-brace
    while executing
"set {}"


Notice that the script that was reported to
be executing when the syntax error was encountered
is incomplete.  In particular, it does not contain
the syntax error.

This is because the length argument passed to Tcl_LogCommandInfo()
in a few places is badly computed.  The parser sets a useful
value in parsePtr->term that will produce the right thing, but
for some reason the wrong thing has taken root for ages.
Referenced by1
dgpplain2013-07-18 13:29:42
There's also a memory leak due to at least
one missing Tcl_FreeParse() call.  That raises
the severity and pushes the fix target back to 8.5.*.
dgpplain2013-07-18 14:27:24
False alarm on the memory leak.  Tcl_ParseCommand() does
its own token memory cleanup when returning TCL_ERROR.
dgpplain2013-07-18 15:06:11
Fixed on trunk.
Log in (anonymous is fine) to add a comment.