Artifacts Associated With Ticket 218918ffffffffff
Ticket change [2038282811] (rid 91279) by nobody on 2000-10-26 01:07:52:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- 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 - foundin initialized to: "obsolete: 8.2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "regsub commands causes core dump"
- type initialized to: "Bug"
Ticket change [fcab7df3e9] (rid 108280) by welch on 2000-10-26 08:31:16:
- closedate changed to: "2000-10-26T01:31:16"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [43bfe0438f] (rid 116615) by dgp on 2001-04-19 03:21:52:
- closedate changed to: "2001-04-18T20:21:52"
- closer changed to: "dgp"
- subsystem changed to: "43. Regexp"