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

production win32/1.1.8 -> isAssignableFrom caues crash if class is unresolved

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.1.8
    • hotspot
    • x86
    • windows_nt

      With the win32 1.1.8 production JDK, isAssignableFrom will cause a
      crash (looks like the equavilant of a seg fault -> memory at 0 is
      being referenced)

      This does not happen on other JDKs (including 1.2, hotspot, jdk1.1.7 or
      solaris jdks)

      This ONLY happens if you have a jar file on the class path

      I am including a test case which will demonstrate this problem

      It creates a class loader which loads a class from a directory

      To use the test case:

      * unzip the test.zip file
        It contains:
      MyClassLoader.java -> simple test case
      MyClassLoader.class -> compiled version of test case
      test\emptyclass.java -> a java class with nothing in it
      test\emptyclass.class -> compiled empty class
      lib\servlet.jar -> the servlet jar file

      * set your class path to:
      set CLASSPATH=.;.\lib\servlet.jar

      * run the test ...
         To get the crash use:
      java MyClassLoader test emptyclass fail

         To see a non-failing case (because the call is made after resolve) use:
      java MyClassLoader test emptyclass


        e.g.: if there is a
      java MyClassLoader foo myclass -> successful case
      java MyClassLoader foo myclass fail -> crash should occur

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: