Artifacts Associated With Ticket 478c446889
Ticket change [4b282ca1b4] (rid 142017) by bovine on 2015-06-10 18:06:51:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
In Tcl_ZlibInflate of generic/tclZlib.c there is this error block: if ((stream.avail_in == 0) && (stream.avail_out > 0)) { e = Z_STREAM_ERROR; goto error; } I believe that needs to call inflateEnd(&stream) before the goto to avoid leaking zlib memory structures. This leak would only occur if you are trying to decompress corrupted/incomplete data a lot. - foundin initialized to: "8.6.3"
- is_private initialized to: "0"
- login: "bovine"
- priority initialized to: "5 Medium"
- private_contact initialized to: "f0e2312a244c99b69b66ff52a743015292c5af63"
- resolution initialized to: "None"
- severity initialized to: "Important"
- status initialized to: "Open"
- submitter initialized to: "bovine"
- subsystem initialized to: "57. zlib"
- title initialized to:
zlib inflate leaking memory on Z_STREAM_ERROR condition
- type initialized to: "Bug"
Ticket change [04f96076ab] (rid 142018) by bovine on 2015-06-10 18:13:06:
- icomment:
Is there perhaps also a leak in this error block earlier in that function? if (headerPtr) { e = inflateGetHeader(&stream, headerPtr); if (e != Z_OK) { goto error; } } I think that should also call inflateEnd(&stream) prior to the goto? - login: "bovine"
- mimetype: "text/plain"
- icomment:
Add attachment "leaky.tcl" [31bc4e7e63] (rid 142019) by bovine on 2015-06-10 18:22:58.
Ticket change [12ad083cfc] (rid 142030) by mistachkin on 2015-06-11 02:50:42:
- closedate changed to: "2457184.61855148"
- closer changed to: "mistachkin"
- foundin changed to: "8.6.4"
- icomment:
Fixed on trunk via check-in [513c7ae3fcc2b76a]. There is no easy way to automatically test this; however, I manually verified it by observing the process memory usage with and without the fix (i.e. without the fix, the memory usage kept growing).
- login: "mistachkin"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"