JDK-8214344 : C2: assert(con.basic_type() != T_ILLEGAL) failed: elembt=byte; loadbt=void; unsigned=0
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11,12
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-11-27
  • Updated: 2020-04-22
  • Resolved: 2018-11-30
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 11 JDK 12
11.0.7Fixed 12 b23Fixed
C2 compiler failed with the assertion during loop optimizations when compiling the following method with the following stack:

Current CompileTask:
C2:17926321 63147   !   4       com.sun.jck.lib.ExecJCKTestSameJVMCmd::execute (397 bytes)

Stack: [0x00007f2880193000,0x00007f2880294000],  sp=0x00007f288028d980,  free space=1002k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x178e0aa]  Type::make_constant_from_array_element(ciArray*, int, int, BasicType, bool)+0xba
V  [libjvm.so+0x12f9615]  LoadNode::Value(PhaseGVN*) const+0xef5
V  [libjvm.so+0x14dd387]  PhaseIterGVN::transform_old(Node*)+0x2b7
V  [libjvm.so+0x14d6f19]  PhaseIterGVN::optimize()+0x59
V  [libjvm.so+0x1202e6f]  PhaseIdealLoop::build_and_optimize(LoopOptsMode)+0xcef
V  [libjvm.so+0x9d8cca]  Compile::optimize_loops(int&, PhaseIterGVN&, LoopOptsMode) [clone .part.413]+0x2ca
V  [libjvm.so+0x9dc078]  Compile::Optimize()+0xc78
V  [libjvm.so+0x9dcfbc]  Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0xd7c
V  [libjvm.so+0x7d7fa1]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0xd1
V  [libjvm.so+0x9ea8db]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0x34b
V  [libjvm.so+0x9eb888]  CompileBroker::compiler_thread_loop()+0x458
V  [libjvm.so+0x175673b]  JavaThread::thread_main_inner()+0x20b
V  [libjvm.so+0x17569b9]  JavaThread::run()+0x1b9
V  [libjvm.so+0x1751cfd]  Thread::call_run()+0x6d
V  [libjvm.so+0x14318a6]  thread_native_entry(Thread*)+0x106

Fix Request (11u) This resolves the C2 assertion that is a potential bug. Seen in 11u CTW tests. Patch applies cleanly to 11u, new test fails without the product patch, passes with it. Patched JDK passes tier1, tier2, tier3 tests.

I believe this explains similar failure in CTW for 11u-shenandoah (compiling groovy-eclipse-batch-2.4.3-01.jar). The new test fails on vanilla 11u without the patch as well.

Okay, great!

I have a test case and a fix.

[~mdoerr], why did you assign this to Roland? This code was recently modified by [~rkennke]'s patch for JDK-8213371. Do you have a reproducer for this? ILW = Crash during compilation, rare, disable compilation = HLM = P3