Skip to content
Tcl Source Code History Of Ticket 217886ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 217886ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 217886ffffffffffffffffffffffffffffffffff

  1. Ticket change [1f0f181ff8] (rid 91080) by nobody on 2000-10-26 00:45:23:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2382 Bug
      Version: 8.2b1
      SubmitDate: '1999-07-16'
      LastModified: '1999-07-29'
      Severity: LOW
      Status: Closed
      Submitter: techsupp
      ChangedBy: redman
      RelatedBugIDs: 2466
      OS: Other
      Machine: NA
      FixedDate: '1999-07-21'
      ClosedDate: '1999-07-29'
      
      
      Name:
      
      Peter Spjuth
      
      
      
      ObservedBehavior:
      
      info complete returns 1 for a string missing a close 
      
          bracket, if the last char is a close bracket:
      
          
      
          % info complete {[a [b]}
      
          1
      
          
      
          By adding a space:
      
          
      
          % info complete {[a [b] }
      
          0
      
          
      
          They are also treated slightly differently by eval,
      
          the difference is that the error is caught later in the
      
          buggy case:
      
          
      
          % eval {[a [b]}
      
          missing close-bracket
      
          % set errorInfo
      
          missing close-bracket
      
              while compiling
      
          "a"
      
              while compiling
      
          "[a [b]"
      
              ("eval" body line 1)
      
              invoked from within
      
          "eval {[a [b]}"
      
          
      
          % eval {[a [b] }
      
          missing close-bracket
      
          % set errorInfo
      
          missing close-bracket
      
              while compiling
      
          "[a [b] "
      
              ("eval" body line 1)
      
              invoked from within
      
          "eval {[a [b] }"
      
          
      
          The bug is in ParseTokens() in tclParse.c
      
          When encountering an open bracket, the rest is parsed until a 
      
          matching close bracket is found, or the string is ended.
      
          After that, the only check is whether the last parsed char was 
      
          a close bracket. No check is made if it was that close bracket, 
      
          or an end of string that terminated the parse.
      
      
      
      Patch:
      
      *** tclParse.orig       Fri Jul 16 22:02:32 1999
      
      --- tclParse.c  Fri Jul 16 22:23:54 1999
      
      ***************
      
      *** 607,613 ****
      
                      if (nested.tokenPtr != nested.staticTokens) {
      
                          ckfree((char *) nested.tokenPtr);
      
                      }
      
      !               if ((src[-1] == ']') && !nested.incomplete) {
      
                          break;
      
                      }
      
                      if (src == parsePtr->end) {
      
      --- 607,614 ----
      
                      if (nested.tokenPtr != nested.staticTokens) {
      
                          ckfree((char *) nested.tokenPtr);
      
                      }
      
      !               if ((*nested.term != 0) && (src[-1] == ']')
      
      !                       && !nested.incomplete) {
      
                          break;
      
                      }
      
                      if (src == parsePtr->end) {
      
      
      
      PatchFiles:
      
      tclParse.c (CVS 1.8)
      
      
      
      
      
      Applied patch, added test case.  Fixed in 8.2b2. 
      -- 07/21/1999 redman
      Bad patch, removed changes.  The patch breaks other test cases on Unix but not Windows.  Needs more investigation.
      
      -- 07/23/1999 redman
      See 2466, new patch.
      
      -- 07/29/1999 redman
      
      
      
    4. foundin initialized to: "obsolete: 8.2b1"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "69. Other"
    10. title initialized to: "info complete gives wrong answer"
    11. type initialized to: "Bug"
  2. Ticket change [e75f4c79ae] (rid 104447) by welch on 2000-10-26 08:09:11:

    1. closedate changed to: "2000-10-26T01:09:11"
    2. closer changed to: "welch"
    3. priority changed to: "3 Low"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [6836873aba] (rid 103021) by dgp on 2001-04-14 01:41:53:

    1. subsystem changed to: "45. Parsing and Eval"
  4. Ticket change [af618ca7f8] (rid 97802) by dgp on 2001-04-14 01:41:54:

    1. closedate changed to: "2001-04-13T18:41:54"
    2. closer changed to: "dgp"