Overview
| Comment: | [kennykb-numerics-branch] * generic/tclStrToD.c: Memory leak. Comment in TclSetBignumIntRep * generic/tclObj.c: indicates that mp_init() is called on the bignumValue argument to clear it, while keeping the digits array transferred to the interp of the Tcl_Obj. The implication is that callers of TclSetBignumIntRep() (and their callers) need not call mp_clear(), but can imagine they've transferred ownership of an mp_int value to Tcl. However, mp_init() doesn't merely re-initialize the fields of an mp_int to hold the value zero. It also allocates a fresh dp array of minimum size governed by MP_PREC. Without a corresponding mp_clear() call somewhere, these dp arrays are leaked. Added some mp_clear() calls to fix the leak, but better fix strategies should still be pursued. Perhaps the best approach is to just invade the mp_int struct and do the necessary surgery ourselves. |
|---|---|
| Timelines: | family | ancestors | descendants | both | kennykb-numerics-branch |
| Files: | files | file ages | folders |
| SHA1: |
961337390cc121096a3e25ef6a077cc5 |
| User & Date: | dgp on 2005-09-23 04:03:43.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
2005-09-23
| ||
| 16:13 | [kennykb-numerics-branch] * generic/tclStrToD.c: Fixed memory leak. [Bug 1299803]... check-in: 112ace53ab user: dgp tags: kennykb-numerics-branch | |
| 04:03 | [kennykb-numerics-branch] * generic/tclStrToD.c: Memory leak. Comment in TclSetBi... check-in: 961337390c user: dgp tags: kennykb-numerics-branch | |
|
2005-09-20
| ||
| 14:11 | [kennykb-numerics-branch] * generic/tclExecute.c: Revise TclIncrObj() to call ... check-in: dd93281cd4 user: dgp tags: kennykb-numerics-branch | |
Changes
Modified ChangeLog
from [956b3d5988]
to [b637c11e61].
[diff]
Modified generic/tclObj.c
from [c9620ce1f0]
to [e1525f486e].
[diff]
Modified generic/tclStrToD.c
from [682de850f8]
to [adfa1cdf95].
[diff]