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

java.util.zip.ZipFile.ZipFile(String) dumps core

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.2.1
    • Fix Version/s: 1.3.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
      jar
    • Resolved In Build:
      kestrel
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.6
    • Verification:
      Verified

      Description



      Name: ksC84122 Date: 12/18/98



      java.util.zip.ZipFile.ZipFile(String),
      java.util.jar.JarFile.JarFile(String name) and
      java.util.jar.JarFile.JarFile(String name, boolean verify)
      cause core dump in JDK-1.2-V when called
      with name = null.

      An example to reproduce this:
      ===== Test15.java ====
      import java.util.zip.*;
      import java.io.File;

      public class Test15 {

        public static void main (String argv[]) {

          File file = null;
          String fileName = null;

          try {
              new ZipFile(fileName);
          }
          catch (NullPointerException npe) {
              System.out.println("Passed");
              return; }
          catch (Throwable e) {
              System.out.println("Failed: NullPointerException expected");
              return;
          }
          System.out.println("Failed: NullPointerException expected");
          return;
        }

      }

      ========= Sample run (JDK-1.2-V) ==========
      #>java Test15
      FATAL ERROR in native method: Null object passed to a non-static method
              at java.util.zip.ZipFile.open(Native Method)
              at java.util.zip.ZipFile.<init>(Compiled Code)
              at Test15.main(Compiled Code)
      SIGABRT 6* abort (generated by abort(3) routine)
          si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)
          si_errno [0]: Error 0
          si_code [0]: SI_USER [pid: 14561, uid: 346]
              stackpointer=efffe8c0

      Full thread dump Classic VM (JDK-1.2-V, green threads):
          "Finalizer" (TID:0xebc98320, sys_thread_t:0x69218, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:112)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
          "Reference Handler" (TID:0xebc983b0, sys_thread_t:0x64d68, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Object.java:424)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
          "Signal dispatcher" (TID:0xebc983e0, sys_thread_t:0x5dfe8, state:CW) prio=5
          "main" (TID:0xebc981e0, sys_thread_t:0x26900, state:R) prio=5
              at java.util.zip.ZipFile.open(Native Method)
              at java.util.zip.ZipFile.<init>(Compiled Code)
              at Test15.main(Compiled Code)
      Monitor Cache Dump:
          java.lang.ref.ReferenceQueue$Lock@EBC98338/EBCCE028: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x69218)
          java.lang.ref.Reference$Lock@EBC983C0/EBCCDB20: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x64d68)
      Registered Monitor Dump:
          PCMap lock: <unowned>
          utf8 hash table: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class linking lock: <unowned>
          System class loader lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Monitor cache lock: owner "main" (0x26900) 1 entry
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x5dfe8)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
          Alarm monitor: <unowned>
              Waiting to be notified:
                  <unknown thread> (0x2bbf0)
          Thread queue lock: owner "main" (0x26900) 1 entry
          Monitor registry: owner "main" (0x26900) 1 entry

         Abort (core dumped)

      (gdb) where
      #0 0xef6072e0 in _libc_kill ()
      #1 0xef5ba558 in abort ()
      #2 0xef6d5934 in jni_Invoke ()
      #3 0xef6d6fcc in jni_CallObjectMethod ()
      #4 0xef34cb0c in JNU_GetStringPlatformChars ()
      #5 0xef1d5ac4 in Java_java_util_zip_ZipFile_open ()
      #6 0xef7115a8 in args_done ()
      #7 0xef6bf504 in invokeJNINativeMethod ()
      #8 0xef11ec00 in JIT_CALLBACK3_MARKER ()
      #9 0x1436ac in ?? ()
      #10 0x1a850c in ?? ()
      #11 0xef11e980 in JIT_INVOKER_MARKER ()
      #12 0xef711eec in notJavaInvocation ()
      #13 0xef6d5ae4 in jni_Invoke ()
      #14 0xef6d8884 in jni_CallStaticVoidMethod ()
      #15 0x11a7c in main ()
      (gdb)


      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zlisunw Zhenghua Li (Inactive)
              Reporter:
              ksoshals Kirill Soshalskiy (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: