Overview
| Artifact ID: | 39333665258076b0bd7a985d2d2b15f92e307d56 |
|---|---|
| Ticket: | 218198ffffffffffffffffffffffffffffffffff
malloc returns NULL and causes core |
| User & Date: | nobody on 2000-10-26 00:54:24 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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 - foundin changed to: "obsolete: 8.0p2"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "malloc returns NULL and causes core"
- type changed to: "Bug"