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

Class.getInterfaces() causes VM to core dump if interface class file is missing

XMLWordPrintable

    • sparc
    • solaris_2.5

      Calling the Class.getInterfaces() method causes the VM to core dump if the interface
      class file is missing. The following is an example. If you compile Sample.java and
      remove EmptyInterface.class and run Sample the VM gets a bus error.



      zaphod: sigbus, 134 > cat Sample.java
      class Sample implements EmptyInterface {
          public static void main(String[] args)
          {
      Sample sample = new Sample();
      System.out.println(sample.getClass().getInterfaces());
          }
      }
      zaphod: sigbus, 135 > cat EmptyInterface.java
      interface EmptyInterface {}
      zaphod: sigbus, 136 > javac Sample.java
      zaphod: sigbus, 137 > rm EmptyInterface.class
      rm: remove EmptyInterface.class (y/n)? y
      zaphod: sigbus, 138 > java Sample
      SIGBUS 10* bus error
          si_signo [10]: SIGBUS 10* bus error
          si_errno [0]: Error 0
          si_code [1]: BUS_ADRERR [addr: 0x35]

      stackbase=EFFFF77C, stackpointer=EFFFF440

      Full thread dump:
          "Finalizer thread" (TID:0xee7003a0, sys_thread_t:0xee3f1de0) prio=1
          "Async Garbage Collector" (TID:0xee700358, sys_thread_t:0xef441de0) prio=1
          "Idle thread" (TID:0xee700310, sys_thread_t:0xef471de0) prio=0
          "clock handler" (TID:0xee7000d0, sys_thread_t:0xef551de0) prio=11
          "main" (TID:0xee7000a0, sys_thread_t:0x82690) prio=5: pending=java.lang.NoClassDefFoundError *current thread*
      Sample.main(Sample.java:5)
      Monitor Cache Dump:
      Registered Monitor Dump:
          Finalize me queue lock: unowned
          Thread queue lock: unowned
          Class lock: unowned
          String intern lock: unowned
          Java stack lock: unowned
          Code rewrite lock: unowned
          Heap lock: unowned
          Has finalization queue lock: unowned
          Monitor IO lock: unowned
          Child death monitor: unowned
          Event monitor: unowned
          I/O monitor: unowned
          Alarm monitor: unowned
      Waiting to be notified:
      "clock handler"
          Sbrk lock: unowned
          Monitor cache lock: unowned
          Monitor registry: monitor owner: "main"
      Thread Alarm Q:
      Abort (core dumped)
      zaphod: sigbus, 139 >

            tlindholsunw Timothy Lindholm (Inactive)
            awollratsunw Ann Wollrath (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: