Overview
| Artifact ID: | a7fa36ab3a90e1e7ee2fb639c5e1f86704af4543 |
|---|---|
| Ticket: | 219398ffffffffffffffffffffffffffffffffff
another memory leak in lsort |
| User & Date: | nobody on 2000-10-26 05:12:25 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "obsolete: 8.3.2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "another memory leak in lsort"
- type changed to: "Bug"