Skip to content
Tcl Source Code History Of Ticket 599788ffff
Login

History Of Ticket 599788ffff

Artifacts Associated With Ticket 599788ffff

  1. Ticket change [3393d4ca68] (rid 106620) by wilkason on 2002-08-25 00:25:31:

    1. assignee initialized to: "msofer"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The crash originates in generic\tclExecute.c 
      GetSrcInfoForPc at line 4574 
      at CVS head on 8/24/02 The code is below, what 
      happens is the call to 
      macro TclGetInt4AtPtr with value 0xFF returns a huge 
      negative number thus 
      later causing offsets to break and eventually a crash in 
      tclBasic.c 
      Tcl_LogCommandInfo. The error was introduced 
      sometime after 8.4b2. The offending 
      source code is below:
      
      if ((unsigned int) (*srcDeltaNext) == 
      (unsigned int) 0xFF) {
          srcDeltaNext++;
          delta = TclGetInt4AtPtr(srcDeltaNext);    // 
      <- bad juju returned
          srcDeltaNext += 4;
      } else {
          delta = TclGetInt1AtPtr(srcDeltaNext);
          srcDeltaNext++;
      }
      }
      
      Source in the attached file to see it.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "wilkason"
    9. subsystem initialized to: "47. Bytecode Compiler"
    10. title initialized to: "error in catch causing tclsh segfault"
    11. type initialized to: "Bug"
  2. Ticket change [3e747b2e02] (rid 121269) by wilkason on 2002-08-25 07:25:31:

    1. icomment:
      
      
      File Added - 29738: test.tcl
      
      
      
    2. login: "wilkason"
    3. mimetype: "text/plain"
    4. username: "wilkason"
  3. Add attachment "test.tcl" [1786739822] (rid 122510) by wilkason on 2002-08-25 07:25:31.

  4. Ticket change [c85b8c1816] (rid 122086) by wilkason on 2002-08-25 07:29:10:

    1. foundin changed to: "obsolete: 8.4b3"
    2. priority changed to: "8"
  5. Ticket change [5e7d8159f1] (rid 115643) by msofer on 2002-08-25 19:20:22:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      I get the segfault also in 8.4b2, but not in 8.4b1. It
      figure, since little has been changed that could trigger
      this since 8.4b2.
      The segfault is also triggered by 
         set a([x])
      - assuming no command 'x' is defined.
      
      
      The code section mentioned has never been touched since 8.0.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. priority changed to: "9 Immediate"
    5. username: "msofer"
  6. Ticket change [10d81a2eff] (rid 95031) by msofer on 2002-08-25 20:56:03:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      TclLogCommandInfo is getting wrong input: 'script' and
      'command' do point to strings with the correct contents, but
      'command' is not a substring of 'script' as it should. See
      the debug session below:
      
      (gdb) r
      Starting program: /CVS/tcl_SF_clean/unix/tclsh 
      % set a([set x])
      
      Program received signal SIGSEGV, Segmentation fault.
      0x0806d426 in Tcl_LogCommandInfo (interp=0x81070e0,
      script=0x810f9a0 "set a([set x])\n", 
          command=0xbfffe88e "set x]\"", length=5) at
      ./../generic/tclBasic.c:3243
      3243            if (*p == '\n') {
      (gdb) p p
      $1 = 0x8130000 <Address 0x8130000 out of bounds>
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  7. Ticket change [9d594bf5cb] (rid 96288) by msofer on 2002-08-26 00:39:29:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Found the problem; it is caused by the CONSTification of the
      parser/compiler. In tclCompCmds.c, line 3267, we are
      compiling the tokens from a *copy* of the relevant source
      string, thus getting pointers to said copy instead of to the
      original. 
      Diagnostic done, fix not yet ...
      
      The simplest script to show the bug is
          set a([error])
      when it is compiled (ie, typed at the tclsh prompt or in a
      proc body if sourced).
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. title changed to:
      error in (array element script) causing tclsh segfault
      
    5. username: "msofer"
  8. Ticket change [5ea57da335] (rid 115671) by msofer on 2002-08-27 00:39:49:

    1. closedate changed to: "2002-08-26T17:39:49"
    2. closer changed to: "msofer"
    3. icomment:
      Logged In: YES 
      user_id=148712
      
      Fixed by copying the tokens instead of copying/reparsing the
      source string.
      
      
    4. login: "msofer"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "msofer"