Skip to content
Tcl Source Code History Of Ticket 218924ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 218924ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 218924ffffffffffffffffffffffffffffffffff

  1. Ticket change [595ab49951] (rid 117965) by nobody on 2000-10-26 01:07:57:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2795 Bug
      Version: 8.2
      SubmitDate: '1999-09-16'
      LastModified: '1999-09-18'
      Severity: MED
      Status: Released
      Submitter: techsupp
      ChangedBy: hobbs
      RelatedBugIDs: 2518
      OS: AIX
      OSVersion: 4.3.2
      Machine: RS6000
      FixedDate: '1999-09-18'
      FixedInVersion: 8.2.1
      ClosedDate: '2000-10-25'
      
      
      Name:
      
      Nick Kisseberth
      
      
      
      Comments:
      
      Tcl_Alloc(0) should either always return NULL when asked for 0 bytes
      
          or should always return a unique pointer. It shouldn't maintain the
      
          "implementation defined" definition ANSI gives malloc(0). So for AIX
      
          it could just convert a request for 0 bytes to a request for 1 byte.
      
          I prefer Tcl_Alloc(0) to return NULL, but I suspect I'll be in the 
      
          minority.
      
      
      
      ObservedBehavior:
      
      Tcl doesn't like malloc(0) returning NULL. This is valid ANSI C
      
          behavior (malloc(0) is implementation defined, must return NULL or
      
          unique pointer). Tcl_Alloc will panic because of this.
      
      
      
      DesiredBehavior:
      
      malloc(0)==NULL should be permitted
      
      
      
      Patch:
      
      *** tcl8.2.0/generic/tclCkalloc.c       Tue Aug 10 11:09:45 1999
      
      --- tcl8.2.0-AIX/generic/tclCkalloc.c   Thu Sep  9 11:46:12 1999
      
      ***************
      
      *** 799,805 ****
      
                char *result;
      
        
      
                result = TclpAlloc(size);
      
      !         if (result == NULL) 
      
                        panic("unable to alloc %d bytes", size);
      
                return result;
      
        }
      
      --- 799,805 ----
      
                char *result;
      
        
      
                result = TclpAlloc(size);
      
      !         if ((result == NULL) && (size != 0))
      
                        panic("unable to alloc %d bytes", size);
      
                return result;
      
        }
      
      
      
      PatchFiles:
      
      generic/tclCkalloc.c
      
      
      
      
      
      A more complete patch in the above style is included for 8.2.1. 
      -- 09/18/1999 hobbs
      
    4. foundin initialized to: "obsolete: 8.2"
    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: "malloc(0) == NULL on AIX is not an error"
    11. type initialized to: "Bug"
  2. Ticket change [6a985fe54f] (rid 128182) by welch on 2000-10-26 08:31:17:

    1. closedate changed to: "2000-10-26T01:31:17"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [01fcf4fcbe] (rid 119573) by dgp on 2001-04-19 03:24:06:

    1. closedate changed to: "2001-04-18T20:24:06"
    2. closer changed to: "dgp"
    3. subsystem changed to: "41. Memory Allocation"