2

概括

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

当我运行界面时,Java 运行时环境检测到一个致命错误:

  • SIGSEGV (0xb) 在 pc=0xb71b9bde,pid=12918,tid=3030936432
  • JRE 版本:Java(TM) SE 运行时环境 (8.0_51-b16) (build 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
#
4

0 回答 0