Artifacts Associated With Ticket 681841ffffffffff
Ticket change [8711b6eb65] (rid 131630) by vincentdarley on 2003-02-06 18:41:59:
- assignee initialized to: "msofer"
- cmimetype initialized to: "text/plain"
- comment initialized to:
This script, when evaluated (note the missing closing square bracket): catch { if {![catch [list foo]} { } } err puts $err puts $errorInfo gives me: invalid command name "fo" while executing "fo" invoked from within "catch [list foo" i.e. 'err' is empty, and errorInfo has somehow dropped the last 'o' from foo. Both of these seem incorrect. - foundin initialized to: "obsolete: 8.4.1.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "45. Parsing and Eval"
- title initialized to: "odd error message with missing character"
- type initialized to: "Bug"
Ticket change [a0165033ea] (rid 96746) by msofer on 2003-02-07 02:17:41:
- icomment:
Logged In: YES user_id=148712 AIEEEEE! Mem corruption in the parser? Introduced between 8.4b1 and 8.4b2 ...
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "msofer"
- icomment:
Ticket change [d22ba30a1a] (rid 113484) by dgp on 2003-02-07 04:58:02:
- icomment:
Logged In: YES user_id=80530 Therefore my parser rewrite is likely to blame.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [03cba0e2a8] (rid 119885) by dgp on 2003-02-07 05:22:31:
- icomment:
Logged In: YES user_id=80530 Ouch! Note that the return from [catch] here is TCL_OK, not TCL_ERROR !
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [8de2bcae5e] (rid 128018) by dgp on 2003-02-07 05:28:24:
- icomment:
Logged In: YES user_id=80530 Error is in parsing nested command evaluations in an expression. Simpler test case: expr {[set a [format bc]} Miguel, error should be found in lines 1261-1313 of tclParseExpr.c - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [3dc2508211] (rid 121148) by dgp on 2003-02-07 13:46:57:
- icomment:
Logged In: YES user_id=80530 Curious. There is a parsing error there, but there always has been. Before, Tcl would parse the expression wrong, allowing the error to go unnoticed, but then the compiler would raise an error when trying to compile the command substitutions in the expr. The *new* error is that Tcl_ParseCommand itself is buggy in handling strings that have a ] following the string to be parsed. See this with testparser {set a [format bc]} 16 in both 8.3 and 8.4. (length 16 does not include the closing ]. Thus a parse error in 8.3, but a mistaken acceptance in 8.4, apparently due to an effective read beyond numbytes when parsing.) Both errors should be fixed. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [842fcea04f] (rid 117499) by msofer on 2003-02-07 18:59:12:
- icomment:
Logged In: YES user_id=148712 Debug notes RE the new error: something subtle going on, witness % set x {set a [format bc]} set a [format bc] % set y [string range $x 0 15] set a [format bc % testparser $x 16 - {set a [format bc} 3 simple set 1 text set 0 simple a 1 text a 0 word {[format bc} 1 command {[format bc} 0 \] % testparser $y 16 missing close-bracket - login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [9d75d18117] (rid 96311) by dkf on 2003-02-07 22:28:17:
- icomment:
Logged In: YES user_id=79902 I suspect a problem near tclParse.c:865
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [8eeb6c0c62] (rid 120201) by dkf on 2003-02-07 22:30:07:
- icomment:
Logged In: YES user_id=79902 Yes, shouldn't the tests there come after the test to see if the end of the string has been reached?
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [bc293f6526] (rid 129618) by dkf on 2003-02-07 22:32:43:
- icomment:
Logged In: YES user_id=79902 Obviously not (or we barf on init.tcl!) :^/
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [a0d7fa707b] (rid 96879) by dkf on 2003-02-07 23:13:56:
- icomment:
Logged In: YES user_id=79902 Further investigation seems to indicate the problem as being that when parsing bracketed things, the trailing bracket is consumed by Tcl_ParseCommand, stopping us from telling whether it should have done so. Perhaps. Everything's so recursive it's hard to tell for sure...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [f72506cf3a] (rid 91323) by dkf on 2003-02-07 23:16:13:
- icomment:
Logged In: YES user_id=79902 I don't know which function has responsibility for stripping the close bracket. The open bracket is obviously consumed by ParseTokens(), but who gets the close?
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [0bb62896dd] (rid 114039) by dgp on 2003-02-08 02:06:40:
- icomment:
Logged In: YES user_id=80530 patch coming soon.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [876ea4cf83] (rid 131697) by dgp on 2003-02-08 03:30:09:
- icomment:
File Added - 41799: 681841.patch Logged In: YES user_id=80530 please review this patch.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [331d919ddd] (rid 106528) by msofer on 2003-02-08 03:57:21:
- icomment:
Logged In: YES user_id=148712 Patch looks good! Q: does it also solve the old bug you mentioned? (I never got around to understanding what it is ...)
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [821b1c4980] (rid 117171) by dgp on 2003-02-08 06:29:29:
- icomment:
Logged In: YES user_id=80530 There is a similar error in Tcl_EvalEx() that can be demo'd by subst {a[set b [format cd]} no syntax error reported. - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [034bf7aad8] (rid 119803) by dgp on 2003-02-08 07:18:04:
- icomment:
File Deleted - 41799: File Added - 41816: 681841.patch Logged In: YES user_id=80530 Here is an updated patch that also includes a fix for Tcl_EvalEx(). I suspect there are still errors involving the setting of iPtr->termOffset. Not ready to commit yet.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [ae321c9795] (rid 101600) by dgp on 2003-02-08 08:10:18:
- icomment:
Logged In: YES user_id=80530 Here's another demo of the original bug: % if {1 && "" == [puts \]} {} \ Note that a backslash is printed, not a ] ! - login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [b2e564e6d4] (rid 98418) by dgp on 2003-02-13 01:36:19:
- icomment:
File Deleted - 41816: File Added - 42217: 681841.patch Logged In: YES user_id=80530 Here's an updated patch that takes care of updating tclCompile.c. More bugs fixed, and ::errorInfo trace should now be improved when parsing errors occur. Please review. Still more work to do on Tcl_EvalEx.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [54bc625fa1] (rid 93995) by dgp on 2003-02-13 08:46:20:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=80530 another updated patch. Now includes changes to Tcl_EvalEx in tclBasic.c No more code changes to make. With this patch, 8 tests in subst.test fail, but arguably they are testing bugward compatibility, and the new behavior is better. Assigning to the [subst] maintainer for his opinion on that.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [5409e20f64] (rid 93868) by dgp on 2003-02-13 08:46:21:
- icomment:
File Deleted - 42217: File Added - 42249: 681841.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "681841.patch" [74539233be] (rid 105188) by dgp on 2003-02-13 08:46:21.
Ticket change [2245d1554a] (rid 130717) by dkf on 2003-02-13 21:31:50:
- icomment:
Logged In: YES user_id=79902 And people wonder why Tcl_SubstObj has undefined behaviour...
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b0fdd50d82] (rid 98069) by dkf on 2003-02-13 21:57:57:
- icomment:
Logged In: YES user_id=79902 OK, I prefer the behaviour of [subst] forced by these changes. It's even less surprising given the documentation of the command as being like substitution inside a "quoted" string; we're actually closer to the documentation with this alteration! Go ahead and modify subst.test so that the following tests do not fail: subst-8.6, subst-8.7, subst-8.8, subst-10.4, subst-10.5, subst-11.4, subst-11.5
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [de5d0d3628] (rid 114835) by dkf on 2003-02-13 21:59:53:
- assignee changed to: "dgp"
Ticket change [f20ea07b3f] (rid 109470) by dgp on 2003-02-13 23:07:19:
- assignee changed to: "dkf"
- icomment:
Logged In: YES user_id=80530 I'm having second thoughts about tests subst-10.4 and subst-10.5. In those tests a [break] is being used to halt substitution. In that case, it seems strange for a parse error beyond the [break] to cause an error. Thoughts?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
Ticket change [5a8038fd49] (rid 118151) by dkf on 2003-02-13 23:39:18:
- icomment:
Logged In: YES user_id=79902 Ultimately, the behaviour of [subst] is strange in so many ways in these edge cases. Given that, it's hard to believe that many people are encountering them, so fixing them any way you like (especially if it is more consistent with the documentation of the command) will be no problem. Perhaps the alteration of that aspect should wait for 8.4.2 to be branched off though, for maximum backward compatability.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [b6e9863b72] (rid 125494) by dgp on 2003-02-13 23:46:51:
- icomment:
Logged In: YES user_id=80530 yes, for the sake of good patch-release compatibility, I am separating the bug fix patch from the "improve subst" patch. update soon.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2af65a2766] (rid 118657) by dgp on 2003-02-14 01:08:40:
- assignee changed to: "msofer"
Ticket change [0abc5919ff] (rid 113876) by dgp on 2003-02-14 01:08:41:
- icomment:
Logged In: YES user_id=80530 Here's the final version of the patch. Ambitious changes to [subst] have been removed. Just the bug fix, ma'am. Please review, test, and commit.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "681841-final.patch" [29b0b3ea5a] (rid 88911) by dgp on 2003-02-14 01:08:44.
Ticket change [597d868b01] (rid 117985) by dgp on 2003-02-14 01:08:45:
- icomment:
File Added - 42334: 681841-final.patch
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [2b393f90cc] (rid 118706) by msofer on 2003-02-16 08:49:33:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=148712 Reviewed, teste, committed. Assigning to dgp for the [subst] fixes - or else, for branching the subst bugs to another ticket and closing thisone
- login: "msofer"
- mimetype: "text/plain"
- priority changed to: "5 Medium"
- username: "msofer"
Ticket change [fba561d812] (rid 92102) by dgp on 2003-02-17 03:20:46:
- closedate changed to: "2003-02-16T20:20:46"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 the bug is fixed. Other changes will be dealt with in other reports.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"