Artifacts Associated With Ticket 217898
Ticket change [dbf1a38a7a] (rid 108049) by nobody on 2000-10-26 00:45:35:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2518 Bug Version: 8.2b2 SubmitDate: '1999-08-10' LastModified: '1999-09-17' Severity: MED Status: Closed Submitter: techsupp ChangedBy: hobbs RelatedBugIDs: 2795 OS: AIX OSVersion: 4.3.2 Machine: RS6000 FixedDate: '2000-10-25' ClosedDate: '1999-09-17' Name: Valdis Kletnieks CVS: updated from CVS 08/10/99 * RCS: @(#) $Id: tclScan.c,v 1.2 1999/04/16 00:46:53 stanton Exp $ Comments: The attached patch works around the problem at the cost of a small amount of temporarily allocated memory. I wasn't ambitious enough to examine tclScan.c in more detail to see if there should be explicit tests/returns if numVars was a broken value. ReproducibleScript: On AIX 4.3.2, 'make test' fails fatally in 'scan.test' with an error unable to allocate zero bytes. DesiredBehavior: tclScan.c should not blindly call ckalloc() for zero bytes, which can happen if ValidateFormat() or Tcl_ScanObjCmd() is called with an incorrect objv list (which is intentionally tested in scan.test, and could also be tripped over by buggy user code, which should trigger a tcl_error, not crash Tcl entirely. Patch: http://black-ice.cc.vt.edu/~valdis/tcl8.2.tclScan.patch PatchFiles: tclScan.c This appears to be just an AIX problem. Duffin says that the alloc of 0 bytes is undefined (although it shouldn't crash). He also states: Looking at the code in ValidateFormat in tclScan.c I noticed that you are not trying to use a local fixed size array as is normally done to try and reduce the number of allocations so that is probably the problem. Doing something like if (numVars > LOCAL_SIZE) { nassign = ckalloc (...) } else { nassign = localArray; } and the necessary clean up will probably fix it and fit in better with the way that it is normally done. -- 08/11/1999 hobbs - foundin initialized to: "obsolete: 8.2b2"
- 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:
tclScan.c should not blindly call ckalloc() for zero bytes o
- type initialized to: "Bug"
Ticket change [fc60f9a8d5] (rid 108229) by welch on 2000-10-26 08:09:11:
- closedate changed to: "2000-10-26T01:09:11"
- closer changed to: "welch"
- priority changed to: "3 Low"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [c80db5beeb] (rid 122045) by dgp on 2001-04-14 02:04:28:
- closedate changed to: "2001-04-13T19:04:28"
- closer changed to: "dgp"
- subsystem changed to: "23. [scan]"