Skip to content
Tcl Source Code History Of Ticket 218918
Login

History Of Ticket 218918

Artifacts Associated With Ticket 218918

  1. Ticket change [2038282811] (rid 91279) by nobody on 2000-10-26 01:07:52:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2723 Bug
      Version: 8.2
      SubmitDate: '1999-09-10'
      LastModified: '1999-09-10'
      Severity: CRIT
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      OS: SunOS
      OSVersion: All other platforms are affetced as well
      Machine: Sparc
      FixedDate: '1999-09-10'
      FixedInVersion: 8.2.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      Wolfgang S. Kechel
      
      Comments:
      Error happens only when regsub command is used with wrong replacement
          spec.
      
      ReproducibleScript:
      regsub scene- scene-push {win-\1} winproc
          
          I know this spec is wrong, but it should not cause memory corruption or
          core-dumps.
          The correct command is:
          regsub {scene-(.+)} scene-push {win-\1} winproc;
      
      ObservedBehavior:
      The code in Tcl_RegSubObjCmd line 490, the indexed match 1 is used in
              subStart = info.matches[index].start;
              subEnd = info.matches[index].end;
          for \1 in the substitution spec, but there is not first match. So memory
          is
          dereferenced that should not be referenced and a portion of data is
          appended
          to the result that has nothing to do with the command parameters. It
          happens,
          that due to the values stored in the memory area chunk of 80MB or even
          larger might be copied into the result, the chunks may become to big for
          malloc and
          cause a core dump.
          
          into the result or
      
      DesiredBehavior:
      I expect the regsub command to issue an error when no match for a \Digit
          spec
          is present in the source string (like Emacs does it)!
      
      
      
      I have fixed
      this for the next release to just default to null, which is the same
      behavior that Perl and Emacs have. 
      -- 09/10/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.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: "regsub commands causes core dump"
    11. type initialized to: "Bug"
  2. Ticket change [fcab7df3e9] (rid 108280) by welch on 2000-10-26 08:31:16:

    1. closedate changed to: "2000-10-26T01:31:16"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [43bfe0438f] (rid 116615) by dgp on 2001-04-19 03:21:52:

    1. closedate changed to: "2001-04-18T20:21:52"
    2. closer changed to: "dgp"
    3. subsystem changed to: "43. Regexp"