Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6223076

Unnecessary object retention in java.util.zip.Deflater

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 1.3.1, 1.4.2, 5.0, 6
    • Fix Version/s: 1.3.1_16
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b01
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        It's not uncommon for applications that compress large quantities of data to
        pass a very large byte array to the Deflater.setInput method, either directly
        or via the DeflaterOutputStream.write method. The Deflater code saves a
        reference to the given byte array in a private field, and this private field is
        never cleared. Since the Deflater class has a finalization method it can take
        quite a while for a Deflater instance to be garbage collected, and in the
        meantime the potentially-large byte array will be kept alive for no reason.
        This has been observed to cause OutOfMemoryErrors under heavy load.

        This bug is present in 1.3.1, 1.4.x, 5.0, and Mustang.

        ###@###.### 2005-1-28 20:22:46 GMT

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  hgodugusunw Harsha Godugu (Inactive)
                  Reporter:
                  mr Mark Reinhold
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  0 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Imported:
                    Indexed: