Artifacts Associated With Ticket 3315098
Ticket change [2f1eb1f9a4] (rid 93002) by gneumann on 2011-06-11 14:46:21:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized 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 initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "gneumann"
- subsystem initialized to: "None"
- title initialized to:
Small memory leak in 8.5 branch ShorteningBignumConversion()
- type initialized to: "Bug"
Ticket change [b698e23967] (rid 125448) by dkf on 2011-06-13 16:23:00:
- assignee changed to: "dgp"
- priority changed to: "9 Immediate"
Ticket change [c1ec09f00f] (rid 111409) by dkf on 2011-06-13 16:25:12:
- foundin changed to: "obsolete: 8.5.9"
- subsystem changed to: "48. Number Handling"
Ticket change [14875183b8] (rid 124409) by dgp on 2011-06-13 20:44:19:
- icomment:
Thanks for catching that. Fix commits in progress.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [79bcddfd52] (rid 90183) by dgp on 2011-06-13 20:44:20:
- closedate changed to: "2011-06-13T13:44:20"
- closer changed to: "dgp"
- icomment:
allow_comments - 1
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dgp"