Overview
| Artifact ID: | 02454db17413edf4129afb5c1089e205c6060075 |
|---|---|
| Ticket: | 3363369fffffffffffffffffffffffffffffffff
Tcl_SetObjResult can't handle NULL, despite documentation |
| User & Date: | foomench on 2011-07-11 19:29:10 |
Changes
- assignee changed to: "msofer"
- cmimetype changed to: "text/plain"
- comment changed to:
Documentation for Tcl_SetObjResult states, "If objPtr is NULL, interp->objResult is set to a new Tcl object containing an empty string." However, the code doesn't do this. In fact, it tries to use objPtr in a Tcl_IncrRefCount call without checking for NULL, which results in an exception. Here's the code: void Tcl_SetObjResult( Tcl_Interp *interp,/* Interpreter with which to associate the * return object value. */ register Tcl_Obj *objPtr)/* Tcl object to be returned. If NULL, the obj * result is made an empty string object. */ { register Interp *iPtr = (Interp *) interp; register Tcl_Obj *oldObjResult = iPtr->objResultPtr; iPtr->objResultPtr = objPtr; Tcl_IncrRefCount(objPtr);/* since interp result is a reference */ ... - foundin changed to: "None"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "foomench"
- subsystem changed to: "10. Objects"
- title changed to:
Tcl_SetObjResult can't handle NULL, despite documentation
- type changed to: "Bug"