Skip to content
Tcl Source Code History Of Ticket 218196ffffffffff
Login

History Of Ticket 218196ffffffffff

Artifacts Associated With Ticket 218196ffffffffff

  1. Ticket change [86d5c0d87b] (rid 131585) by nobody on 2000-10-26 00:54:23:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 2384 Bug
      Version: 8.2b1
      SubmitDate: '1999-07-19'
      LastModified: '1999-07-21'
      Severity: SER
      Status: Closed
      Submitter: techsupp
      ChangedBy: redman
      OS: Other
      Machine: NA
      FixedDate: '2000-10-25'
      ClosedDate: '1999-07-21'
      
      
      Name:
      
      Martin Forssen
      
      
      
      ObservedBehavior:
      
      Tcl_DbCkrealloc crashes if the memory area to be realloced is NULL.
      
      
      
      DesiredBehavior:
      
      It should work as Tcl_Dballoc in this case (since that is what realloc
      
          does)
      
      
      
      Patch:
      
      *** generic/tclCkalloc.c        Fri Apr 16 03:46:42 1999
      
      --- ../tcl8.1/generic/tclCkalloc.c      Fri May  7 22:27:39 1999
      
      ***************
      
      *** 522,535 ****
      
        {
      
            char *new;
      
            unsigned int copySize;
      
        
      
            /*
      
             * See comment from Tcl_DbCkfree before you change the following
      
             * line.
      
             */
      
        
      
      !     struct mem_header *memp = (struct mem_header *)
      
      !           (((unsigned long) ptr) - BODY_OFFSET);
      
        
      
            copySize = size;
      
            if (copySize > (unsigned int) memp->length) {
      
      --- 522,539 ----
      
        {
      
            char *new;
      
            unsigned int copySize;
      
      +     struct mem_header *memp;
      
      + 
      
      +     if (NULL == ptr) {
      
      +       return Tcl_DbCkalloc(size, file, line);
      
      +     }
      
        
      
            /*
      
             * See comment from Tcl_DbCkfree before you change the following
      
             * line.
      
             */
      
        
      
      !     memp = (struct mem_header *) (((unsigned long) ptr) - BODY_OFFSET);
      
        
      
            copySize = size;
      
            if (copySize > (unsigned int) memp->length) {
      
      
      
      PatchFiles:
      
      generic/tclCkalloc.c
      
      
      
      
      
      Umm... why in the world would you realloc a NULL pointer?  Correct behavior. 
      -- 07/21/1999 redman
      
    4. foundin initialized to: "obsolete: 8.2b1"
    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: "Tcl_DbCkrealloc craches on NULL-pointers"
    11. type initialized to: "Bug"
  2. Ticket change [da153a4ad3] (rid 107713) by welch on 2000-10-26 08:16:56:

    1. closedate changed to: "2000-10-26T01:16:56"
    2. closer changed to: "welch"
    3. priority changed to: "2"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
  3. Ticket change [0ea109a821] (rid 94651) by dgp on 2001-04-18 21:36:04:

    1. closedate changed to: "2001-04-18T14:36:04"
    2. closer changed to: "dgp"
    3. subsystem changed to: "41. Memory Allocation"