-
Bug
-
Resolution: Fixed
-
P3
-
repo-valhalla
The attached test crashes with a segfault in TypeAryPtr::flat_log_elem_size().
To reproduce:
$ java --enable-preview --source 24 --add-exports java.base/jdk.internal.value=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED Test.java && jfval --enable-preview --add-exports java.base/jdk.internal.value=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED -Xcomp -XX:CompileOnly=Test*::test* Test
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007694fe515750, pid=576208, tid=576222
#
# JRE version: Java(TM) SE Runtime Environment (24.0+1) (fastdebug build 24-valhalla+1-31)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-valhalla+1-31, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1915750] TypeAryPtr::flat_log_elem_size() const+0x50
............
Command Line: --enable-preview --add-exports=java.base/jdk.internal.value=ALL-UNNAMED --add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED -Xcomp -XX:CompileOnly=Test*::test* Test
.............
C2:160 64 b 4 Test::test (24 bytes)
Stack: [0x000075deaca00000,0x000075deacb00000], sp=0x000075deacafc390, free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1915750] TypeAryPtr::flat_log_elem_size() const+0x50
V [libjvm.so+0xe3d968] GraphKit::array_element_address(Node*, Node*, BasicType, TypeInt const*, Node*)+0x78
V [libjvm.so+0x15fe305] Parse::array_addressing(BasicType, int, Type const*&)+0x395
V [libjvm.so+0x15fea3f] Parse::array_load(BasicType)+0x3f
V [libjvm.so+0x160f08e] Parse::do_one_bytecode()+0x74e
V [libjvm.so+0x15f52aa] Parse::do_one_block()+0x20a
V [libjvm.so+0x15f6766] Parse::do_all_blocks()+0x136
V [libjvm.so+0x15fa4a2] Parse::Parse(JVMState*, ciMethod*, float)+0xe52
V [libjvm.so+0x8b238c] ParseGenerator::generate(JVMState*)+0x16c
V [libjvm.so+0xa7a861] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1841
V [libjvm.so+0x8af952] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f2
V [libjvm.so+0xa86868] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928
V [libjvm.so+0xa874d8] CompileBroker::compiler_thread_loop()+0x458
V [libjvm.so+0xf8107c] JavaThread::thread_main_inner()+0xcc
V [libjvm.so+0x18e8256] Thread::call_run()+0xb6
V [libjvm.so+0x15a9937] thread_native_entry(Thread*)+0x127
To reproduce:
$ java --enable-preview --source 24 --add-exports java.base/jdk.internal.value=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED Test.java && jfval --enable-preview --add-exports java.base/jdk.internal.value=ALL-UNNAMED --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED -Xcomp -XX:CompileOnly=Test*::test* Test
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007694fe515750, pid=576208, tid=576222
#
# JRE version: Java(TM) SE Runtime Environment (24.0+1) (fastdebug build 24-valhalla+1-31)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-valhalla+1-31, compiled mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x1915750] TypeAryPtr::flat_log_elem_size() const+0x50
............
Command Line: --enable-preview --add-exports=java.base/jdk.internal.value=ALL-UNNAMED --add-exports=java.base/jdk.internal.vm.annotation=ALL-UNNAMED -Xcomp -XX:CompileOnly=Test*::test* Test
.............
C2:160 64 b 4 Test::test (24 bytes)
Stack: [0x000075deaca00000,0x000075deacb00000], sp=0x000075deacafc390, free space=1008k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x1915750] TypeAryPtr::flat_log_elem_size() const+0x50
V [libjvm.so+0xe3d968] GraphKit::array_element_address(Node*, Node*, BasicType, TypeInt const*, Node*)+0x78
V [libjvm.so+0x15fe305] Parse::array_addressing(BasicType, int, Type const*&)+0x395
V [libjvm.so+0x15fea3f] Parse::array_load(BasicType)+0x3f
V [libjvm.so+0x160f08e] Parse::do_one_bytecode()+0x74e
V [libjvm.so+0x15f52aa] Parse::do_one_block()+0x20a
V [libjvm.so+0x15f6766] Parse::do_all_blocks()+0x136
V [libjvm.so+0x15fa4a2] Parse::Parse(JVMState*, ciMethod*, float)+0xe52
V [libjvm.so+0x8b238c] ParseGenerator::generate(JVMState*)+0x16c
V [libjvm.so+0xa7a861] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1841
V [libjvm.so+0x8af952] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1f2
V [libjvm.so+0xa86868] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x928
V [libjvm.so+0xa874d8] CompileBroker::compiler_thread_loop()+0x458
V [libjvm.so+0xf8107c] JavaThread::thread_main_inner()+0xcc
V [libjvm.so+0x18e8256] Thread::call_run()+0xb6
V [libjvm.so+0x15a9937] thread_native_entry(Thread*)+0x127
- relates to
-
JDK-8345696 [lworld] C2: Refactor the inline type code in array_load/store()
-
- Open
-
-
JDK-8345681 [lworld] C2: TypeAryPtr::is_null_free() does not work for any null-free array
-
- Closed
-
- links to
-
Commit(lworld) openjdk/valhalla/c4f1714d
-
Review(lworld) openjdk/valhalla/1314