Missing Java reference in ZipFileInputStream causes crash

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.4.0
    • Affects Version/s: 1.3.0
    • Component/s: core-libs
    • None
    • beta
    • generic, x86
    • generic, windows_2000

      Between JDK 1.2.2 and JDK 1.3, a finalizer was added to java.util.zip.ZipFile
      which calls close(). However, the jlong pointing to the underlying C data
      structure is being passed around as an identifier rather than the Java object.
      The specific application code which now fails is:
       - Create ZipFile
       - Obtain InputStream (ZipFileInputStream)
       - Release Java reference to ZipFile

      The ZipFile will then be GC'd while the application is reading from the input
      stream, leading to a crash in native code.

            Assignee:
            Zhenghua Li (Inactive)
            Reporter:
            Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: