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

InterfaceMethod CP entry pointing to a class should cause ICCE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b96
    • Verification:
      Fix failed

      Description

      The following invoke instructions are successfully executed:
         invokestatic #3; //InterfaceMethod C.foo:()V
         invokestatic #3; //Method I.foo:()V

      where
        class C {...}
        interface I {...}

      JVMS-5.4.3.3 Method Resolution:
       " If C is an interface, method resolution throws an IncompatibleClassChangeError."
      JVMS-5.4.3.4 Interface Method Resolution:
       "If C is not an interface, interface method resolution throws an IncompatibleClassChangeError"

      Test case attached(IntfMethod.java):
      $ java -Xverify:all IntfMethod
      testSpecialIntf: FAILED (no exception)
      testStaticIntf: FAILED (no exception)
      testSpecialClass: FAILED (no exception)
      testStaticClass: FAILED (no exception)

        Attachments

        1. BadInterfaceMethodRef.jasm
          1 kB
          Stanislav Lukyanov
        2. BadMethodRef.jasm
          2 kB
          Stanislav Lukyanov
        3. IntfMethod.java
          5 kB
          Vladimir Ivanov

          Issue Links

            Activity

              People

              • Assignee:
                minqi Yumin Qi
                Reporter:
                vlivanov Vladimir Ivanov
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: