Reproducer:
void main() {
var map = new ConcurrentHashMap<Object, Object>();
map.put(1, 0);
}
Compiling that and running it with java -Xcomp -XX:-TieredCompilation -XX:+UseFPUForSpilling Test results in a crash, I appended a hs_err log but you probably won't need it.
I assume that the assertion and the ShouldNotReachHere() at https://github.com/openjdk/jdk/blob/1fcede053cca360c96606c1034b2a365a4fada82/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp are wrong with FPU spilling enabled.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (barrierSetAssembler_aarch64.cpp:428), pid=1112888, tid=1112904
# Error: ShouldNotReachHere()
#
# JRE version: OpenJDK Runtime Environment (25.0+26) (build 25-ea+26-3358)
# Java VM: OpenJDK 64-Bit Server VM (25-ea+26-3358, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x448094] BarrierSetAssembler::refine_register(Node const*, int)+0xd4
Current CompileTask:
C2:241 133 !b java.util.concurrent.ConcurrentHashMap::replaceNode (437 bytes)
Stack: [0x0000ee2d39c04000,0x0000ee2d39e02000], sp=0x0000ee2d39dfdc60, free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x448094] BarrierSetAssembler::refine_register(Node const*, int)+0xd4 (barrierSetAssembler_aarch64.cpp:428)
V [libjvm.so+0x44c778] BarrierSetC2::compute_liveness_at_stubs() const+0x378
V [libjvm.so+0x728bdc] G1BarrierSetC2::late_barrier_analysis() const+0x1c
V [libjvm.so+0xc8937c] PhaseOutput::Output()+0x794
V [libjvm.so+0x5f6328] Compile::Code_Gen()+0x560
V [libjvm.so+0x5f8480] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1170
V [libjvm.so+0x51af44] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x140
V [libjvm.so+0x5ff990] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x324
V [libjvm.so+0x600bfc] CompileBroker::compiler_thread_loop()+0x3fc
V [libjvm.so+0x8a95a8] JavaThread::thread_main_inner() [clone .part.0]+0xa4
V [libjvm.so+0xe2b808] Thread::call_run()+0xa8
V [libjvm.so+0xc70488] thread_native_entry(Thread*)+0xd8
void main() {
var map = new ConcurrentHashMap<Object, Object>();
map.put(1, 0);
}
Compiling that and running it with java -Xcomp -XX:-TieredCompilation -XX:+UseFPUForSpilling Test results in a crash, I appended a hs_err log but you probably won't need it.
I assume that the assertion and the ShouldNotReachHere() at https://github.com/openjdk/jdk/blob/1fcede053cca360c96606c1034b2a365a4fada82/src/hotspot/cpu/aarch64/gc/shared/barrierSetAssembler_aarch64.cpp are wrong with FPU spilling enabled.
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (barrierSetAssembler_aarch64.cpp:428), pid=1112888, tid=1112904
# Error: ShouldNotReachHere()
#
# JRE version: OpenJDK Runtime Environment (25.0+26) (build 25-ea+26-3358)
# Java VM: OpenJDK 64-Bit Server VM (25-ea+26-3358, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-aarch64)
# Problematic frame:
# V [libjvm.so+0x448094] BarrierSetAssembler::refine_register(Node const*, int)+0xd4
Current CompileTask:
C2:241 133 !b java.util.concurrent.ConcurrentHashMap::replaceNode (437 bytes)
Stack: [0x0000ee2d39c04000,0x0000ee2d39e02000], sp=0x0000ee2d39dfdc60, free space=2023k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x448094] BarrierSetAssembler::refine_register(Node const*, int)+0xd4 (barrierSetAssembler_aarch64.cpp:428)
V [libjvm.so+0x44c778] BarrierSetC2::compute_liveness_at_stubs() const+0x378
V [libjvm.so+0x728bdc] G1BarrierSetC2::late_barrier_analysis() const+0x1c
V [libjvm.so+0xc8937c] PhaseOutput::Output()+0x794
V [libjvm.so+0x5f6328] Compile::Code_Gen()+0x560
V [libjvm.so+0x5f8480] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1170
V [libjvm.so+0x51af44] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x140
V [libjvm.so+0x5ff990] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x324
V [libjvm.so+0x600bfc] CompileBroker::compiler_thread_loop()+0x3fc
V [libjvm.so+0x8a95a8] JavaThread::thread_main_inner() [clone .part.0]+0xa4
V [libjvm.so+0xe2b808] Thread::call_run()+0xa8
V [libjvm.so+0xc70488] thread_native_entry(Thread*)+0xd8
- caused by
-
JDK-8334060 Implementation of Late Barrier Expansion for G1
-
- Resolved
-