Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 39333665258076b0bd7a985d2d2b15f92e307d56
Ticket: 218198ffffffffffffffffffffffffffffffffff
malloc returns NULL and causes core
User & Date: nobody on 2000-10-26 00:54:24
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2399 Bug
    Version: 8.0p2
    SubmitDate: '1999-07-19'
    LastModified: '1999-08-05'
    Severity: CRIT
    Status: Closed
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Other
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '1999-08-05'
    
    
    Name:
    christopher costello
    
    ReproducibleScript:
    Run any tcl application until memory is exhausted. If the #defines are
        set to use normal malloc/free, then a NULL pointer will be used in the
        (multiple) places in the tcl source where the result is not checked.
        Since memory exhaustion cannot in principle be excluded, this suggests
        that your design approach means that one must always compile with
        TCL_MEM_DEBUG or USE_TCLALLOC or risk a core. A better solution would be
        to check the return value of all mallocs at the place of call, where the
        action appropriate for recovery is knowable.
    
    
    
    Tcl does not check against the return values of mallocs because
    the philosophy is that if you are out of memory, you are screwed
    one way or the other.  To get a NULL and panic (thus aborting)
    gives you just about the same result.  Adding in all the checks
    would just cause a performance hit. 
    -- 08/05/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0p2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "malloc returns NULL and causes core"
  11. type changed to: "Bug"