JDK-8259339 : AllocateUninitializedArray C2 intrinsic fails with void.class input
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 9,11,16,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-01-06
  • Updated: 2021-02-02
  • Resolved: 2021-01-07
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 16 JDK 17
11.0.11-oracleFixed 16.0.1Fixed 17 b05Fixed
Related Reports
Relates :  
Relates :  
Description
#  Internal Error (/oracle/jdk/open/src/hotspot/share/opto/library_call.cpp:3584), pid=278705, tid=278720
#  guarantee(method_id == method->intrinsic_id()) failed: must match

Current CompileTask:
C2:   2092  419       4       jdk.internal.misc.Unsafe::allocateUninitializedArray (55 bytes)

Stack: [0x00007f6866a38000,0x00007f6866b39000],  sp=0x00007f6866b353c0,  free space=1012k
Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [libjvm.so+0x12b2f18]  LibraryCallKit::generate_method_call(vmIntrinsicID, bool, bool)+0x68
V  [libjvm.so+0x12b3e28]  LibraryCallKit::inline_unsafe_newArray(bool)+0x538
V  [libjvm.so+0x12b9fd6]  LibraryIntrinsic::generate(JVMState*)+0x406
V  [libjvm.so+0xb66177]  Parse::do_call()+0x4f7
V  [libjvm.so+0x15f9bb8]  Parse::do_one_bytecode()+0x428
V  [libjvm.so+0x15e7139]  Parse::do_one_block()+0x609
V  [libjvm.so+0x15e8051]  Parse::do_all_blocks()+0x121
V  [libjvm.so+0x15ecb45]  Parse::Parse(JVMState*, ciMethod*, float)+0xbb5
V  [libjvm.so+0x84dea5]  ParseGenerator::generate(JVMState*)+0x115
V  [libjvm.so+0xa1b44b]  Compile::Compile(ciEnv*, ciMethod*, int, bool, bool, bool, bool, DirectiveSet*)+0xf4b
V  [libjvm.so+0x84b76c]  C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1dc
V  [libjvm.so+0xa2bb48]  CompileBroker::invoke_compiler_on_method(CompileTask*)+0xe88
V  [libjvm.so+0xa2c798]  CompileBroker::compiler_thread_loop()+0x5a8
V  [libjvm.so+0x18ba7b6]  JavaThread::thread_main_inner()+0x256
V  [libjvm.so+0x18c1130]  Thread::call_run()+0x100
V  [libjvm.so+0x15a3c06]  thread_native_entry(Thread*)+0x116
Comments
Fix Request (JDK 16u): This bug leads to a guarantee failure when C2 compiling Java code (rare edge case). The fix is low risk and contains a regression test. The patch applies cleanly to JDK 16u. JDK-8259706 will be backported as well.
28-01-2021

Yes, it's on our list (no need to create a backport issue).
15-01-2021

[~thartmann] Does it make sense to port this issue to 16u also? ( if so, is that something that you can do? )
14-01-2021

Fix Request Should get backported for parity with 11.0.11-oracle. Applies cleanly except Copyright year change. I want to backport it together with the follow-up fix JDK-8259706.
14-01-2021

Changeset: 0e6de4eb Author: Tobias Hartmann <thartmann@openjdk.org> Date: 2021-01-07 12:15:23 +0000 URL: https://git.openjdk.java.net/jdk/commit/0e6de4eb
07-01-2021

ILW = Compilation of C2 intrinsic fails with guarantee, edge case but easy to reproduce, disable intrinsic = HLM = P3
06-01-2021