Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-06-19
04:19 • Closed ticket [1978179fff]: expr panic plus 7 other changes artifact: 5ab501977e user: dgp
04:04 • Ticket [1978179fff]: 4 changes artifact: 3c82b26f71 user: dgp
03:59 • Ticket [1978179fff]: 4 changes artifact: 8248ab64c4 user: dgp
03:56 • Ticket [1978179fff]: 4 changes artifact: 28a2febe10 user: dgp
03:42 • Ticket [1978179fff]: 4 changes artifact: 55d6f704ca user: dgp
2008-05-31
17:36 • Ticket [1978179fff]: 4 changes artifact: d89f5f77b1 user: ferrieux
2008-05-29
18:21 • New ticket [1978179fff]. artifact: f6cefa80af user: dgp

expr panic

Closed / Fixed1978179fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 18 years ago
Descriptionplain2008-05-29 18:21:33
% expr {eq(0)}
CompileSubExpr: token type 160584112 not TCL_TOKEN_SUB_EXPR
ferrieuxplain2008-05-31 17:36:16
Logged In: YES 
user_id=496139
Originator: NO

Not reproducible in 8.5 nor 8.6 HEAD. I assumed 8.4 was frozen. What's the point ?
dgpplain2008-06-19 03:42:29
Logged In: YES 
user_id=80530
Originator: YES


Function names are recorded in the
Tcl_Tokens as operators, then the
operator with name "eq" expects two
arguments and only one is in the
Tcl_Token array.  CRASH
dgpplain2008-06-19 03:56:13
Logged In: YES 
user_id=80530
Originator: YES


The "fix" for "Bug" 1201589 created this
problem, starting in 8.4.10:


2005-05-20  Don Porter  <[email protected]>

        * generic/tclParseExpr.c:       Corrected parser to recognize all
        boolean literals accepted by Tcl_GetBoolean, including prefixes like
        "y" and "f", and to allow "eq" and "ne" as function names in the
        proper context. [Bug 1201589]
dgpplain2008-06-19 03:59:06
Logged In: YES 
user_id=80530
Originator: YES


And that dgp bozo who committed this
change without tests ought get a
severe lashing.
dgpplain2008-06-19 04:04:58
Logged In: YES 
user_id=80530
Originator: YES


hmm... not quite so evil; some tests
did make the 8.5 branch; just not
backported and not complete.
dgpplain2008-06-19 04:19:06
Logged In: YES 
user_id=80530
Originator: YES


"fixed" for 8.4.20 by disabling the attempt
to support functions named eq() or ne().  Clearly
no one is trying to use such things, or they'd
have noticed they are completely broken for
three years.

Anyone needing such functions should just
use Tcl 8.5+.
Log in (anonymous is fine) to add a comment.