Java 8 Update 51(sun-jdk-8u51)null之后运行时致命错误MethodHandle使用448 System :: gc Runnable参数调用startExact

时间:2016-01-18 15:13:45

标签: java lambda java-8 invokedynamic methodhandle

摘要

我能够使用main方法编译一个接口,该方法使用448个Runnable方法引用实例(System :: gc)调用null MethodHandle的invokeExact方法。

当我运行接口时,Java Runtime Environment会检测到致命错误:

  • SIGSEGV(0xb)at pc = 0xb71b9bde,pid = 12918,tid = 3030936432
  • JRE版本:Java(TM)SE运行时环境(8.0_51-b16)(版本1.8.0_51-b16)
  • Java VM:Java HotSpot(TM)客户端VM(25.51-b03混合模式linux-x86)
  • 有问题的框架:
    • V [libjvm.so + 0x507bde] SignatureIterator :: parse_type()+ 0x1ce

源代码和运行时结果链接:http://ideone.com/3oh7Uk

来源

interface $ {
  static void main(String[] $) throws Throwable {
    ((java.lang.invoke.MethodHandle) null).invokeExact(
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc,
      (Runnable) System::gc
    );
  }
}

结果

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb71b9bde, pid=12918, tid=3030936432
#
# JRE version: Java(TM) SE Runtime Environment (8.0_51-b16) (build 1.8.0_51-b16)
# Java VM: Java HotSpot(TM) Client VM (25.51-b03 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x507bde]  SignatureIterator::parse_type()+0x1ce
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# Can not save log file, dump to screen..
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xb71b9bde, pid=12918, tid=3030936432
#
# JRE version: Java(TM) SE Runtime Environment (8.0_51-b16) (build 1.8.0_51-b16)
# Java VM: Java HotSpot(TM) Client VM (25.51-b03 mixed mode linux-x86 )
# Problematic frame:
# V  [libjvm.so+0x507bde]  SignatureIterator::parse_type()+0x1ce
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# If you would like to submit a bug report, please visit:
#   http://b...content-available-to-author-only...a.com/bugreport/crash.jsp
#

0 个答案:

没有答案