JDK-8258790 : C2: Crash on empty macro node list
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16,17
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-12-21
  • Updated: 2022-02-06
  • Resolved: 2020-12-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16 JDK 17
16 b30Fixed 17Fixed
Related Reports
Relates :  
Description
A number of test cases failed with a similar pattern. All had `checkNegativeNumberExpression` as their compile task and PhaseMacroExpand::eliminate_macro_nodes at the top of the stack.

A quote from hs_err:

Current CompileTask:
C2:  33026 6290    b        java.text.SimpleDateFormat::checkNegativeNumberExpression (127 bytes)

Stack: [0x0000fffe78400000,0x0000fffe78600000],  sp=0x0000fffe785fb7f0,  free space=2029k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x976140]  PhaseMacroExpand::eliminate_macro_nodes()+0x15c
V  [libjvm.so+0x5549d0]  Compile::Optimize()+0xf40
V  [libjvm.so+0x555914]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xa14
V  [libjvm.so+0x4a4be8]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x108
V  [libjvm.so+0x55cc08]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x788
V  [libjvm.so+0x55d628]  CompileBroker::compiler_thread_loop()+0x438
V  [libjvm.so+0xbdf53c]  JavaThread::thread_main_inner()+0xe8
V  [libjvm.so+0xbe5da8]  Thread::call_run()+0x104
V  [libjvm.so+0xa61068]  thread_native_entry(Thread*)+0xf8
C  [libpthread.so.0+0x7d40]  start_thread+0xb4

It seems like the combination of '-Xcomp -XX:-TieredCompilation' raises the probability (all failed tests had it).
Comments
Changeset: 772addfd Author: Vladimir Ivanov <vlivanov@openjdk.org> Date: 2020-12-22 12:12:21 +0000 URL: https://git.openjdk.java.net/jdk16/commit/772addfd
22-12-2020