Skip to content
Tcl Source Code History Of Ticket 219328ffffffffff
Login

History Of Ticket 219328ffffffffff

Artifacts Associated With Ticket 219328ffffffffff

  1. Ticket change [60d5712a24] (rid 92141) by nobody on 2000-10-26 05:10:48:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 4215 Bug
      Version: 8.2.2
      SubmitDate: '2000-02-22'
      LastModified: '2000-10-25'
      Severity: MED
      Status: UnAssn
      Submitter: techsupp
      OS: All
      OSVersion: Irix 6.2/6.4/6.56, Redhat Linux 6.1
      Machine: SGI Octane, Dell Pentium III
      FixedDate: '2000-10-25'
      ClosedDate: '2000-10-25'
      
      
      Name:
      Byron Biggs
      
      Extensions:
      tk, BLT, dp, tclX, Tktable, itcl, expect, img
      
      CustomShell:
      plus patch
      
      ObservedBehavior:
      On Irix (SGI), Tcl packages written in C are linked by default with "-rdata_shared", which puts string-literal data into read-only memory.  If a call is then made to Tcl_Eval() passing string literal data, the interpreter core dumps because Tcl_Eval calls Tcl_ParseCommand(), which then tries to modify the string.  The offending line is:
      
          /*
           * Temporarily overwrite the character just after the end of the
           * string with a 0 byte.  This acts as a sentinel and reduces the
           * number of places where we have to check for the end of the
           * input string.  The original value of the byte is restored at
           * the end of the parse.
           */
      
          savedChar = string[numBytes];
          if (savedChar != 0) {
      >>>     string[numBytes] = 0;
          }
      
      Similar behavior is observed on Redhat Linux.  The workaround is to not compile Tcl packages with -rdata_shared on Irix, or to add -fwritable-strings to gcc on Linux.
      
      Note that the BLT package also is compiled by default with -rdata_shared/without -fwritable-strings, and this code contains calls to Tcl_Eval() which pass string literal data.
      
      DesiredBehavior:
      Tcl_Eval(interp,"mycommand") should not core dump when used in packages compiled with the default compile options.
      
      
      
      
      
    4. foundin initialized to: "obsolete: 8.2.2"
    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:
      Tcl_Eval() core dumps if passed a string literal script
      
    11. type initialized to: "Bug"
  2. Ticket change [37c8e657e5] (rid 112090) by dkf on 2000-11-19 08:28:18:

    1. closedate changed to: "2000-11-19T01:28:18"
    2. closer changed to: "dkf"
    3. icomment:
      It is documented in the Tcl_Eval manpage that the string passed to it must exist in *writable* memory.  Since you can always use Tcl_VarEval or (preferably) the Obj-based evaluation functions, nobody really feels like fixing this.
      
      
    4. login: "dkf"
    5. mimetype: "text/plain"
    6. resolution changed to: "Wont Fix"
    7. status changed to: "Closed"
    8. username: "dkf"
  3. Ticket change [7e7c550274] (rid 97420) by dgp on 2001-04-19 04:46:30:

    1. closedate changed to: "2001-04-18T21:46:30"
    2. closer changed to: "dgp"
    3. subsystem changed to: "45. Parsing and Eval"