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

jvm crash on instanceof operator with multidimensional interface type

XMLWordPrintable

    • sparc
    • solaris_2.4



      Name: swC45995 Date: 01/28/97


      Compilation and subsequent execution of the test:

      interface SomeInterface {}

      class SomeClass implements SomeInterface
      {
      int i;
      }


      public class test
      {
      public static void main(String argv[])
      {
      SomeInterface u [][];
      SomeClass x [][];

      u = new SomeClass [3][];
      x = (SomeClass [][]) u;
      if (! (x instanceof SomeInterface [][]))
      System.out.println("fail");
      System.out.println("pass");
      }
      }

      results in JVM crash due to segmentation violation instead of expected:

      novo40% javac test.java
      novo40% java test
      pass

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

            nsaraiyasunw Nakul Saraiya (Inactive)
            wensunw Wen Wen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: