|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
The following causes a runtime crash. The class Object declares a 'registerNatives' method, and this is what gets resolved for the call from 'main'. This condition was not properly accounted for in JVMS 7; the Lambda Spec considers this an IAE (per 5.4.3.4). (Still, a fix should probably be backported -- this does not depend on new 8 features.)
public class RegisterNatives {
interface I { void registerNatives(); }
interface J extends I {}
static class B implements J { public void registerNatives() { System.out.println("B"); } }
public static void main(String... args) {
J val = new B();
val.registerNatives();
}
}
$ -> java8 RegisterNatives
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x000000010ca7ec4c, pid=10885, tid=6403
#
# JRE version: Java(TM) SE Runtime Environment (8.0-b104) (build 1.8.0-ea-b104)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.0-b46 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# V [libjvm.dylib+0x387c4c] LinkResolver::lookup_instance_method_in_klasses(methodHandle&, KlassHandle, Symbol*, Symbol*, Thread*)+0x136
[snip]
Abort trap: 6