Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 556941a83832a1b6b0ba79e923b108863adeb797
Ticket: 218867ffffffffffffffffffffffffffffffffff
info complete (Bug 2382) again
User & Date: nobody on 2000-10-26 01:06:56
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2466 Bug
    Version: 8.2b1
    SubmitDate: '1999-07-28'
    LastModified: '1999-07-30'
    Severity: LOW
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    RelatedBugIDs: 2382
    OS: Other
    Machine: NA
    FixedDate: '1999-07-30'
    FixedInVersion: 8.2b2
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Peter Spjuth
    
    
    
    ReproducibleScript:
    
    This is a new patch to replace the broken patch in Bug 2382.
    
        
    
        My mistake with the first patch, apart from not testing it properly,
    
        was to assume that Tcl_ParseCommand always filled in parsePtr->term.
    
        In some cases it did not, so when accessing *nested.term, there was 
    
        a big chance of getting a Segmentation Fault.
    
        
    
        This patch changes Tcl_ParseCommand to always fill in that value, and
    
        thus making it safe to use it in ParseTokens.
    
        
    
        This time I have tested the patch, and it gets through the test suite on
    
        both Win98 and Solaris.
    
    
    
    Patch:
    
    Index: tclParse.c
    
    ===================================================================
    
    RCS file: /cvsroot/tcl/generic/tclParse.c,v
    
    retrieving revision 1.10
    
    diff -c -r1.10 tclParse.c
    
    *** tclParse.c1999/07/23 23:40:291.10
    
    --- tclParse.c1999/07/27 20:24:59
    
    ***************
    
    *** 260,265 ****
    
    --- 260,266 ----
    
          parsePtr->tokensAvailable = NUM_STATIC_TOKENS;
    
          parsePtr->string = string;
    
          parsePtr->end = string + numBytes;
    
    +     parsePtr->term = parsePtr->end;
    
          parsePtr->interp = interp;
    
          parsePtr->incomplete = 0;
    
          parsePtr->errorType = TCL_PARSE_SUCCESS;
    
    ***************
    
    *** 372,377 ****
    
    --- 373,379 ----
    
          break;
    
      }
    
      if ((type & terminators) != 0) {
    
    +     parsePtr->term = src;
    
          src++;
    
          break;
    
      }
    
    ***************
    
    *** 455,460 ****
    
    --- 457,463 ----
    
      }
    
      
    
      if ((type & terminators) != 0) {
    
    +     parsePtr->term = src;
    
          src++;
    
          break;
    
      }
    
    ***************
    
    *** 607,613 ****
    
      if (nested.tokenPtr != nested.staticTokens) {
    
          ckfree((char *) nested.tokenPtr);
    
      }
    
    ! if ((src[-1] == ']') && !nested.incomplete) {
    
          break;
    
      }
    
      if (src == parsePtr->end) {
    
    --- 610,616 ----
    
      if (nested.tokenPtr != nested.staticTokens) {
    
          ckfree((char *) nested.tokenPtr);
    
      }
    
    ! if ((*nested.term == ']') && !nested.incomplete) {
    
          break;
    
      }
    
      if (src == parsePtr->end) {
    
    
    
    PatchFiles:
    
    tclParse.c
    
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.2b1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "info complete (Bug 2382) again"
  11. type changed to: "Bug"