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.