Skip to content
Tcl Source Code History Of Ticket 218702
Login

History Of Ticket 218702

Artifacts Associated With Ticket 218702

  1. Ticket change [10a4dd14b5] (rid 94998) by nobody on 2000-10-26 01:04:18:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 1793 RFE
      Version: 8.1b3
      SubmitDate: '1999-04-13'
      LastModified: '1999-05-03'
      Severity: LOW
      Status: Released
      Submitter: pat
      ChangedBy: stanton
      OS: Solaris
      OSVersion: 5.5.1
      Machine: Other
      FixedDate: '1999-05-03'
      FixedInVersion: 8.1.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Peter Weigand
      
      
      
      Comments:
      
      This patch may not work for all not writeable strings.
      
      
      
      DesiredBehavior:
      
      If you have a Tcl_Eval(interp, "do_my_command"); it does a segmentation
      
          error if you haven't compiled it with writeable strings.
      
          I have a small patch which will work for such one commands Tcl_Eval's
      
          and you do not need to make strings writeable.
      
      
      
      Patch:
      
      *** tclParse.cFri Apr  2 02:13:25 1999
      
      --- tclParse.c.newTue Apr 13 14:01:01 1999
      
      ***************
      
      *** 277,283 ****
      
      --- 277,285 ----
      
             */
      
        
      
            savedChar = string[numBytes];
      
      +     if (savedChar != 0) {/* not writeable? */
      
            string[numBytes] = 0;
      
      +     }
      
        
      
            /*
      
             * Parse any leading space and comments before the first word of the
      
      ***************
      
      *** 473,483 ****
      
      --- 475,489 ----
      
        
      
        
      
            parsePtr->commandSize = src - parsePtr->commandStart;
      
      +     if (savedChar != 0) {/* not writeable? */
      
            string[numBytes] = (char) savedChar;
      
      +     }
      
            return TCL_OK;
      
        
      
            error:
      
      +     if (savedChar != 0) {/* not writeable? */
      
            string[numBytes] = (char) savedChar;
      
      +     }
      
            if (parsePtr->tokenPtr != parsePtr->staticTokens) {
      
        ckfree((char *) parsePtr->tokenPtr);
      
        parsePtr->tokenPtr = parsePtr->staticTokens;
      
      
      
      PatchFiles:
      
      tclParse.c
      
      
      
      
      
      This patch just avoids the problem in the case where you are passing exactly one word to eval.  
      
      This is really a documentation bug.  The Tcl_Eval manual entry needs to be clear that all strings passed to it must be writable.
      04/15/1999 10:19 - stanton -
      
      The patch avoids modifying strings that are already null terminated.  This should be safe since the action is a noop in any case.  Applied the patch.
      05/03/1999 16:47 - stanton -
      
      
      
    4. foundin initialized to: "obsolete: 8.1b3"
    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: "46. Traces"
    10. title initialized to: "not always compile with writeable string"
    11. type initialized to: "Bug"
  2. Ticket change [789ad63fbe] (rid 89988) by welch on 2000-10-26 08:27:12:

    1. closedate changed to: "2000-10-26T01:27:12"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [5fda033218] (rid 115890) by dgp on 2001-04-04 14:02:51:

    1. closedate changed to: "2001-04-04T07:02:51"
    2. closer changed to: "dgp"
    3. subsystem changed to: "45. Parsing and Eval"