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

C1 assert(known_holder == NULL || (known_holder->is_instance_klass() && (!known_holder->is_interface() || ((ciInstanceKlass*)known_holder)->has_nonstatic_concrete_methods())), "should be non-static concrete method");

    XMLWordPrintable

Details

    • b26

    Backports

      Description

        Running the following code:

        public class Test {

             static final MethodHandle MH_m;

             static {
                 try {
                     MH_m = lookup().findStatic(MyInterface.class, "m", MethodType.methodType(void.class));
                 } catch (ReflectiveOperationException e) {
                     throw new BootstrapMethodError(e);
                 }
             }

             public static void main(String[] args) throws Throwable {
                 for (int i = 0; i < 20_000; i++) {
                     payload();
                 }
             }

             static void payload() throws Throwable {
                 MH_m.invokeExact();
             }

        }

        interface MyInterface {
             static void m() {}
        }

        With `-Xbatch -XX:TieredStopAtLevel=3` fails with the assertion from the title in c1_GraphBuilder::profile_call.

        The MethodHandle is significant here since known_holder in the assert is null with a regular call to a static interface method.

        Attachments

          Issue Links

            Activity

              People

                chagedorn Christian Hagedorn
                jvernee Jorn Vernee
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: