Overview
| Artifact ID: | a9070053b7adcac455e38e29440cfe9a7063a6ce |
|---|---|
| Ticket: | 1299803fffffffffffffffffffffffffffffffff
Tcl_SetBignumObj memory leak |
| User & Date: | dgp on 2005-09-23 04:46:39 |
Changes
- assignee changed to: "kennykb"
- cmimetype changed to: "text/plain"
- comment changed to:
End of the Tcl_SetBignumObj routine: /* Clear the value with mp_init; mp_clear overwrites the digit array. */ mp_init(bignumValue); (Same issue in Tcl_NewBignumObj) The comment suggests that our intent is to free the memory of the bignumValue passed in, while not freeing the digit array that's been transferred to the intrep of the Tcl_Obj. This intent would allow callers of Tcl_(Set|New)BignumObj to not have to worry about calling mp_clear. They can think of these functions as transferring ownership of their mp_int value to Tcl. Trouble is that mp_init() allocates a minimum-sized digit array of MP_PREC mp_digits. This digit array is being leaked. There's a fix for this on the numerics-branch, and these routines aren't actually used on the HEAD yet. A better numerics branch fix, followed by merge onto the HEAD is the way forward. - foundin changed to: "obsolete: 8.5a4"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "10. Objects"
- title changed to: "Tcl_SetBignumObj memory leak"
- type changed to: "Bug"