Artifacts Associated With Ticket 219398
Ticket change [a7fa36ab3a] (rid 98896) by nobody on 2000-10-26 05:12:25:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 6239 Bug Version: 8.3.2 SubmitDate: '2000-09-11' LastModified: '2000-10-25' Severity: MED Status: UnAssn Submitter: techsupp OS: Solaris FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Rob Mayoff ReproducibleScript: Run this command in tclsh: while 1 { lsort -command irrelevant {} } In another window, you can use ps or top to watch tclsh's memory grow without bound. ObservedBehavior: lsort leaks memory when given a -command argument and an empty list. DesiredBehavior: Bounded memory consumption. Patch: *** tclCmdIL.c 2000/08/15 01:11:02 1.1 --- tclCmdIL.c 2000/09/08 01:44:55 1.2 *************** *** 2616,2626 **** sortInfo.resultCode = Tcl_ListObjGetElements(interp, objv[objc-1], &length, &listObjPtrs); ! if (sortInfo.resultCode != TCL_OK) { goto done; - } - if (length <= 0) { - return TCL_OK; } elementArray = (SortElement *) ckalloc(length * sizeof(SortElement)); for (i=0; i < length; i++){ --- 2616,2623 ---- sortInfo.resultCode = Tcl_ListObjGetElements(interp, objv[objc-1], &length, &listObjPtrs); ! if (sortInfo.resultCode != TCL_OK || length <= 0) { goto done; } elementArray = (SortElement *) ckalloc(length * sizeof(SortElement)); for (i=0; i < length; i++){ PatchFiles: tclCmdIL.c - foundin initialized to: "obsolete: 8.3.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: "another memory leak in lsort"
- type initialized to: "Bug"
Ticket change [d310b947d8] (rid 113628) by dkf on 2000-11-15 22:09:45:
- priority changed to: "6"
- subsystem changed to: "81. Bundled Packages"
Ticket change [914e4699cc] (rid 120598) by dkf on 2000-11-23 22:51:26:
- assignee changed to: "dkf"
- foundin changed to: "obsolete: 8.4a2"
- icomment:
Confirmed in 8.4a2. (Wow! This grows *fast*...)
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
Ticket change [ff9e475299] (rid 108780) by dkf on 2000-11-23 22:53:36:
- closedate changed to: "2000-11-23T15:53:36"
- closer changed to: "dkf"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [d496baf2b7] (rid 123475) by dgp on 2001-04-05 08:04:51:
- closedate changed to: "2001-04-05T01:04:51"
- closer changed to: "dgp"
- subsystem changed to: "17. Commands I-L"