Overview
| Artifact ID: | 2f1eb1f9a4d9bad59b07c44846d24706e250fbc0 |
|---|---|
| Ticket: | 3315098fffffffffffffffffffffffffffffffff
Small memory leak in 8.5 branch ShorteningBignumConversion() |
| User & Date: | gneumann on 2011-06-11 14:46:21 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
I obsovered 2 small memleaks in connection with bignums and float conversions in the tcl-core-8-5-branch in fossil ==31820== 32 bytes in 1 blocks are definitely lost in loss record 631 of 1,824 ==31820== at 0x1000111FF: malloc (vg_replace_malloc.c:236) ==31820== by 0x100036185: TclpAlloc (tclAlloc.c:706) ==31820== by 0x100042A49: Tcl_Alloc (tclCkalloc.c:1056) ==31820== by 0x10013B995: TclBN_mp_init_size (bn_mp_init_size.c:27) ==31820== by 0x10013AE1C: TclBN_mp_div_d (bn_mp_div_d.c:78) ==31820== by 0x10011324A: ShorteningBignumConversion (tclStrToD.c:3745) ==31820== by 0x1001114FA: TclDoubleDigits (tclStrToD.c:4239) ==31820== by 0x100120949: Tcl_PrintDouble (tclUtil.c:2848) ==31820== by 0x1000EE90F: UpdateStringOfDouble (tclObj.c:2299) ==31820== by 0x1000EDCFD: Tcl_GetString (tclObj.c:1587) the following simple changes fixes this =================================================================== --- generic/tclStrToD.c +++ generic/tclStrToD.c @@ -3788,11 +3788,11 @@ * string. */ if (m2plus > m2minus) { mp_clear(&mplus); } - mp_clear_multi(&b, &mminus, &temp, NULL); + mp_clear_multi(&b, &mminus, &temp, &dig, &S, NULL); *s = '\0'; *decpt = k; if (endPtr) { *endPtr = s; } - 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: "gneumann"
- subsystem changed to: "None"
- title changed to:
Small memory leak in 8.5 branch ShorteningBignumConversion()
- type changed to: "Bug"