Skip to content
Tcl Source Code History Of Ticket 478c446889
Login

History Of Ticket 478c446889

Artifacts Associated With Ticket 478c446889

  1. Ticket change [4b282ca1b4] (rid 142017) by bovine on 2015-06-10 18:06:51:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. 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.
      
    5. foundin initialized to: "8.6.3"
    6. is_private initialized to: "0"
    7. login: "bovine"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "f0e2312a244c99b69b66ff52a743015292c5af63"
    10. resolution initialized to: "None"
    11. severity initialized to: "Important"
    12. status initialized to: "Open"
    13. submitter initialized to: "bovine"
    14. subsystem initialized to: "57. zlib"
    15. title initialized to:
      zlib inflate leaking memory on Z_STREAM_ERROR condition
      
    16. type initialized to: "Bug"
  2. Ticket change [04f96076ab] (rid 142018) by bovine on 2015-06-10 18:13:06:

    1. 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?
      
    2. login: "bovine"
    3. mimetype: "text/plain"
  3. Add attachment "leaky.tcl" [31bc4e7e63] (rid 142019) by bovine on 2015-06-10 18:22:58.

  4. Ticket change [12ad083cfc] (rid 142030) by mistachkin on 2015-06-11 02:50:42:

    1. closedate changed to: "2457184.61855148"
    2. closer changed to: "mistachkin"
    3. foundin changed to: "8.6.4"
    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).
      
    5. login: "mistachkin"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"