Skip to content
Tcl Source Code History Of Ticket 217898
Login

History Of Ticket 217898

Artifacts Associated With Ticket 217898

  1. Ticket change [dbf1a38a7a] (rid 108049) by nobody on 2000-10-26 00:45:35:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. 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
      
    4. foundin initialized to: "obsolete: 8.2b2"
    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:
      tclScan.c should not blindly call ckalloc() for zero bytes o
      
    11. type initialized to: "Bug"
  2. Ticket change [fc60f9a8d5] (rid 108229) by welch on 2000-10-26 08:09:11:

    1. closedate changed to: "2000-10-26T01:09:11"
    2. closer changed to: "welch"
    3. priority changed to: "3 Low"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [c80db5beeb] (rid 122045) by dgp on 2001-04-14 02:04:28:

    1. closedate changed to: "2001-04-13T19:04:28"
    2. closer changed to: "dgp"
    3. subsystem changed to: "23. [scan]"