JDK-8297933 : [REDO] Compiler should only use verified interface types for optimization
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 6,9,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2022-12-01
  • Updated: 2024-09-18
  • Resolved: 2023-01-09
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 21
21 b05Fixed
Related Reports
Cloners :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-8297934 :  
Description
When a JIT compiles bytecode verified by the VM, any classes it encounters are guaranteed to be type-safe in their usages.  However, the VM verifier has never verified  the use of interfaces at all, as noted recently in the discussion of 5041456.

In the type system which controls the C2 parser and optimizer, unverified interfaces are freely mixed with verified classes.  The result is that the code which makes decisions based on statically predicted reference types must always have a cutout which disables the decision if the type in question is an interface instead of a class.  If such a cutout is missing, there will be a bug, but only in rare cases where a class is recompiled without an interface, and client classes continue to assume it has the interface.

Our system has a more or less complete set of such cutouts, because we have fixed a number of historical bugs involving interface paradoxes.  However, there may be remaining bugs in the system, and new code involving reference type checks will always be somewhat buggy until the proper interface cutouts are coded.

One reason we do not perform certain optimizations, such as CHA on interfaces and recognition of unique implementors, is that the new code to do this would have to "undo" some of the interface cutouts, and would therefore be risky.  C1 has one such optimization, at the cost of inserting a local 'instanceof' check guarding the optimized 'invokeinterface'.  Such an optimization in C2 is best done by the type system, which is impossible as long as type system assertions about interfaces are untrustworthy.

Comments
Thanks Tom, I found these as well and fill fix with JDK-8305339 / JDK-8303512 which are regressions of this.
08-05-2023

Just as an FYI, a few #ifdef DEBUG that should be #ifdef ASSERT ended up in type.cpp from this fix.
05-05-2023

Changeset: 05a0a710 Author: Roland Westrelin <roland@openjdk.org> Date: 2023-01-09 08:26:08 +0000 URL: https://git.openjdk.org/jdk/commit/05a0a710313917fe7124ff43fe9c9af1d649bcac
09-01-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/11666 Date: 2022-12-14 09:55:27 +0000
14-12-2022

This is a list of failing tests, together with the extra flags, and the failure information: 1) compiler/arraycopy/TestArrayCopyStoppedAfterGuards.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/memnode.cpp:2272), pid=822515, tid=822541 # assert(adr_type != __null) failed: expecting TypeKlassPtr # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x15c704c] LoadKlassNode::make(PhaseGVN&, Node*, Node*, Node*, TypePtr const*, TypeKlassPtr const*)+0x1fc # --------------- S U M M A R Y ------------ Current thread (0x00007f8cec344590): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=822541, stack(0x00007f8cc39fa000,0x00007f8cc3afb000)] Current CompileTask: C2: 144 13 b compiler.arraycopy.TestArrayCopyStoppedAfterGuards::test (23 bytes) Stack: [0x00007f8cc39fa000,0x00007f8cc3afb000], sp=0x00007f8cc3af7080, free space=1012k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x15c704c] LoadKlassNode::make(PhaseGVN&, Node*, Node*, Node*, TypePtr const*, TypeKlassPtr const*)+0x1fc (memnode.cpp:2272) V [libjvm.so+0xf1c8f1] GraphKit::load_object_klass(Node*)+0x151 (graphKit.cpp:1179) V [libjvm.so+0x1419a26] LibraryCallKit::inline_arraycopy()+0x7c6 (library_call.cpp:5276) V [libjvm.so+0x1437662] LibraryIntrinsic::generate(JVMState*)+0x302 (library_call.cpp:115) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xafdb6d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d (compile.cpp:760) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 2) compiler/escapeAnalysis/cr6716441/Tester.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/type.hpp:2057), pid=669037, tid=669072 # assert(_base >= OopPtr && _base <= AryPtr) failed: Not a Java pointer # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, compiled mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0xf24cf4] GraphKit::gen_checkcast(Node*, Node*, Node**)+0x844 # --------------- S U M M A R Y ------------ Current thread (0x00007f0bb83444d0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=669072, stack(0x00007f0b9b6a5000,0x00007f0b9b7a6000)] Current CompileTask: C2: 15728 1948 b compiler.escapeAnalysis.cr6716441.Tester::test (1743 bytes) Stack: [0x00007f0b9b6a5000,0x00007f0b9b7a6000], sp=0x00007f0b9b7a2700, free space=1013k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0xf24cf4] GraphKit::gen_checkcast(Node*, Node*, Node**)+0x844 (type.hpp:2057) V [libjvm.so+0x1779174] Parse::do_checkcast()+0x1d4 (parseHelper.cpp:93) V [libjvm.so+0x176f518] Parse::do_one_bytecode()+0xcb8 (parse2.cpp:2707) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xafdb6d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d (compile.cpp:760) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 3) compiler/intrinsics/sha/TestDigest.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/library_call.cpp:6289), pid=1833897, tid=1833912 # assert(tinst != __null) failed: obj is null # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x1427049] LibraryCallKit::load_field_from_object(Node*, char const*, char const*, unsigned long, bool, ciInstanceKlass*)+0x589 # --------------- S U M M A R Y ------------ Current thread (0x00007f661c344440): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=1833912, stack(0x00007f661034d000,0x00007f661044e000)] Current CompileTask: C2: 1184 181 b java.security.MessageDigest::update (45 bytes) Stack: [0x00007f661034d000,0x00007f661044e000], sp=0x00007f6610448a70, free space=1006k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1427049] LibraryCallKit::load_field_from_object(Node*, char const*, char const*, unsigned long, bool, ciInstanceKlass*)+0x589 (library_call.cpp:6289) V [libjvm.so+0x142d677] LibraryCallKit::get_state_from_digest_object(Node*, BasicType)+0x87 (library_call.cpp:7406) V [libjvm.so+0x143130b] LibraryCallKit::inline_digestBase_implCompressMB(Node*, ciInstanceKlass*, BasicType, unsigned char*, char const*, Node*, Node*, Node*)+0x17b (library_call.cpp:7238) V [libjvm.so+0x1431a77] LibraryCallKit::inline_digestBase_implCompressMB(int)+0x337 (library_call.cpp:7224) V [libjvm.so+0x1437662] LibraryIntrinsic::generate(JVMState*)+0x302 (library_call.cpp:115) V [libjvm.so+0x911d32] PredicatedIntrinsicGenerator::generate(JVMState*)+0x7d2 (callGenerator.cpp:1239) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x914f43] PredictedCallGenerator::generate(JVMState*)+0x223 (callGenerator.cpp:894) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xafdb6d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d (compile.cpp:760) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 4) (intermittent? macosx-64 and linux-aarch only?) compiler/intrinsics/unsafe/AllocateUninitializedArray.java -XX:TypeProfileLevel=222 # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/type.cpp:821), pid=3762749, tid=3762777 # fatal error: meet not symmetric # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-aarch64) # Problematic frame: # V [libjvm.so+0x180b8fc] Type::check_symmetrical(Type const*, Type const*) const+0x2bc # --------------- S U M M A R Y ------------ Current thread (0x0000fffcf4365900): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=3762777, stack(0x0000fffcbf1e0000,0x0000fffcbf3e0000)] Current CompileTask: C2: 2900 321 4 compiler.intrinsics.unsafe.AllocateUninitializedArray$$Lambda$38/0x0000000801006c70::call (4 bytes) Stack: [0x0000fffcbf1e0000,0x0000fffcbf3e0000], sp=0x0000fffcbf3dbe30, free space=2031k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x180b8fc] Type::check_symmetrical(Type const*, Type const*) const+0x2bc (type.cpp:821) V [libjvm.so+0x181326c] Type::meet_helper(Type const*, bool) const+0xec (type.cpp:850) V [libjvm.so+0x1813ab8] TypePtr::xmeet_speculative(TypePtr const*) const+0x68 (type.hpp:227) V [libjvm.so+0x1822ecc] TypeInstPtr::xmeet_helper(Type const*) const+0x31c (type.cpp:4143) V [libjvm.so+0x180507c] TypePtr::xmeet(Type const*) const+0x18 (type.cpp:2540) V [libjvm.so+0x1813204] Type::meet_helper(Type const*, bool) const+0x84 (type.cpp:842) V [libjvm.so+0x181381c] TypeOopPtr::filter_helper(Type const*, bool) const+0x18 (type.hpp:184) V [libjvm.so+0x7ffd68] ConstraintCastNode::Value(PhaseGVN*) const+0xc8 (type.hpp:265) V [libjvm.so+0x15801a8] PhaseGVN::transform_no_reclaim(Node*)+0x424 (phaseX.cpp:862) V [libjvm.so+0xd88d74] GraphKit::record_profile_for_speculation(Node*, ciKlass*, ProfilePtrKind)+0x1a4 (graphKit.cpp:2219) V [libjvm.so+0xd89bb8] GraphKit::record_profiled_return_for_speculation()+0xa8 (graphKit.cpp:2327) V [libjvm.so+0xb40500] Parse::do_call()+0x15e0 (doCall.cpp:773) V [libjvm.so+0x1551ca8] Parse::do_one_bytecode()+0x554 (parse2.cpp:2704) V [libjvm.so+0x1540e14] Parse::do_one_block()+0x820 (parse1.cpp:1557) V [libjvm.so+0x1541dcc] Parse::do_all_blocks()+0x148 (parse1.cpp:709) V [libjvm.so+0x15462d4] Parse::Parse(JVMState*, ciMethod*, float)+0xa94 (parse1.cpp:616) V [libjvm.so+0x7c80a0] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x9a7484] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0xfe0 (compile.cpp:760) V [libjvm.so+0x7c5c88] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x1b4 (c2compiler.cpp:113) V [libjvm.so+0x9b4414] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa10 (compileBroker.cpp:2237) V [libjvm.so+0x9b4e78] CompileBroker::compiler_thread_loop()+0x5b8 (compileBroker.cpp:1916) V [libjvm.so+0xed7100] JavaThread::thread_main_inner()+0x21c (javaThread.cpp:697) V [libjvm.so+0x17e5f98] Thread::call_run()+0xf8 (thread.cpp:224) V [libjvm.so+0x14f8944] thread_native_entry(Thread*)+0x100 (os_linux.cpp:739) C [libpthread.so.0+0x7908] start_thread+0x188 5) compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/graphKit.hpp:362), pid=677067, tid=677250 # assert(argument(0)->bottom_type()->isa_ptr()) failed: must be # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, sharing, jvmci, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x91e684] GraphKit::null_check_receiver_before_call(ciMethod*)+0x3e4 # --------------- S U M M A R Y ------------ Current thread (0x00007f1bac49c6d0): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=677250, stack(0x00007f1bc74f9000,0x00007f1bc75fa000)] Current CompileTask: C2: 6151 629 % jdk.vm.ci.runtime.test.TestResolvedJavaType::isAssignableFromTest @ 38 (143 bytes) Stack: [0x00007f1bc74f9000,0x00007f1bc75fa000], sp=0x00007f1bc75f5690, free space=1009k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x91e684] GraphKit::null_check_receiver_before_call(ciMethod*)+0x3e4 (graphKit.hpp:362) V [libjvm.so+0x914e7e] PredictedCallGenerator::generate(JVMState*)+0x15e (callGenerator.cpp:870) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x914f43] PredictedCallGenerator::generate(JVMState*)+0x223 (callGenerator.cpp:894) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xafdb6d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d (compile.cpp:760) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 6) compiler/uncommontrap/TestNullAssertAtCheckCast.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime java.lang.RuntimeException: TestNullAssertAtCheckCast::test1 not compilable at compiler.uncommontrap.TestNullAssertAtCheckCast.main(TestNullAssertAtCheckCast.java:103) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) at java.base/java.lang.reflect.Method.invoke(Method.java:578) at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125) at java.base/java.lang.Thread.run(Thread.java:1591) 7) (linux only?) compiler/unsafe/OpaqueAccesses.java -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+StressArrayCopyMacroNode -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMethodHandleLinkerInlining -XX:+StressCompiledExceptionHandlers # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/type.cpp:2995), pid=1430703, tid=1430722 # assert(ptr != Constant) failed: what is the constant? # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, sharing, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x1aab1d4] TypeRawPtr::cast_to_ptr_type(TypePtr::PTR) const+0xe4 # --------------- T H R E A D --------------- Current thread (0x00007f72a032f800): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=1430722, stack(0x00007f7246e1c000,0x00007f7246f1d000)] Current CompileTask: C2: 312 88 b compiler.unsafe.OpaqueAccesses::testMixedAccess (53 bytes) Stack: [0x00007f7246e1c000,0x00007f7246f1d000], sp=0x00007f7246f18130, free space=1008k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x1aab1d4] TypeRawPtr::cast_to_ptr_type(TypePtr::PTR) const+0xe4 (type.cpp:2995) V [libjvm.so+0x179d0fd] PhaseCCP::analyze()+0x19d (phaseX.cpp:1793) V [libjvm.so+0xafb071] Compile::Optimize()+0x701 (compile.cpp:2360) V [libjvm.so+0xafddae] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x18ce (compile.cpp:830) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 8) (linux only?) compiler/vectorapi/reshape/TestVectorReinterpret.java -XX:-TieredCompilation -XX:+StressReflectiveCode -XX:-ReduceInitialCardMarks -XX:-ReduceBulkZeroing -XX:-ReduceFieldZeroing -XX:+UnlockDiagnosticVMOptions -XX:+ExpandSubTypeCheckAtParseTime # # A fatal error has been detected by the Java Runtime Environment: # # Internal Error (.../open/src/hotspot/share/opto/graphKit.hpp:362), pid=1836792, tid=1836807 # assert(argument(0)->bottom_type()->isa_ptr()) failed: must be # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, sharing, compressed oops, compressed class ptrs, g1 gc, linux-amd64) # Problematic frame: # V [libjvm.so+0x91e684] GraphKit::null_check_receiver_before_call(ciMethod*)+0x3e4 # --------------- S U M M A R Y ------------ Current thread (0x00007fed8c3331f0): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=1836807, stack(0x00007fed80652000,0x00007fed80753000)] Current CompileTask: C2: 6694 841 b jdk.incubator.vector.AbstractVector$$Lambda$105/0x0000000801022428::apply (15 bytes) Stack: [0x00007fed80652000,0x00007fed80753000], sp=0x00007fed8074de50, free space=1007k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.so+0x91e684] GraphKit::null_check_receiver_before_call(ciMethod*)+0x3e4 (graphKit.hpp:362) V [libjvm.so+0x914e7e] PredictedCallGenerator::generate(JVMState*)+0x15e (callGenerator.cpp:870) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0x915249] PredictedCallGenerator::generate(JVMState*)+0x529 (callGenerator.cpp:915) V [libjvm.so+0xcbcec9] Parse::do_call()+0x389 (doCall.cpp:662) V [libjvm.so+0x176ee98] Parse::do_one_bytecode()+0x638 (parse2.cpp:2704) V [libjvm.so+0x175c994] Parse::do_one_block()+0x844 (parse1.cpp:1557) V [libjvm.so+0x175d8f7] Parse::do_all_blocks()+0x137 (parse1.cpp:709) V [libjvm.so+0x17626cd] Parse::Parse(JVMState*, ciMethod*, float)+0xb3d (parse1.cpp:616) V [libjvm.so+0x911320] ParseGenerator::generate(JVMState*)+0x110 (callGenerator.cpp:99) V [libjvm.so+0xafdb6d] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x168d (compile.cpp:760) V [libjvm.so+0x90eed7] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x4e7 (c2compiler.cpp:113) V [libjvm.so+0xb0b06c] CompileBroker::invoke_compiler_on_method(CompileTask*)+0xa7c (compileBroker.cpp:2237) V [libjvm.so+0xb0be58] CompileBroker::compiler_thread_loop()+0x608 (compileBroker.cpp:1916) V [libjvm.so+0x107ba26] JavaThread::thread_main_inner()+0x206 (javaThread.cpp:697) V [libjvm.so+0x1a80eb0] Thread::call_run()+0x100 (thread.cpp:224) V [libjvm.so+0x1712f03] thread_native_entry(Thread*)+0x103 (os_linux.cpp:739) 9) (macosx-x64 only?) compiler/c1/TestArrayCopy.java -XX:+UnlockDiagnosticVMOptions -XX:-TieredCompilation -XX:+StressArrayCopyMacroNode -XX:+StressLCM -XX:+StressGCM -XX:+StressIGVN -XX:+StressCCP -XX:+StressMethodHandleLinkerInlining -XX:+StressCompiledExceptionHandlers # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x000000010a6f24db, pid=55355, tid=40451 # # JRE version: Java(TM) SE Runtime Environment (20.0) (fastdebug build 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk) # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 20-internal-2022-11-30-1648355.emanuel.peter.fork6-jdk, mixed mode, compressed oops, compressed class ptrs, g1 gc, bsd-amd64) # Problematic frame: # V [libjvm.dylib+0xef24db] LShiftLNode::Ideal(PhaseGVN*, bool)+0x18b # --------------- T H R E A D --------------- Current thread (0x00007f8acb812610): JavaThread "C2 CompilerThread3" daemon [_thread_in_native, id=40451, stack(0x0000700007552000,0x0000700007652000)] Current CompileTask: C2: 895 214 compiler.c1.TestArrayCopy::main (71 bytes) Stack: [0x0000700007552000,0x0000700007652000], sp=0x000070000764e240, free space=1008k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [libjvm.dylib+0xef24db] LShiftLNode::Ideal(PhaseGVN*, bool)+0x18b V [libjvm.dylib+0xfc3223] PhaseIterGVN::transform_old(Node*)+0x3b3 V [libjvm.dylib+0x32adb1] ArrayCopyNode::prepare_array_copy(PhaseGVN*, bool, Node*&, Node*&, Node*&, Node*&, BasicType&, Type const*&, bool&)+0x1001 V [libjvm.dylib+0x32d29d] ArrayCopyNode::Ideal(PhaseGVN*, bool)+0x81d V [libjvm.dylib+0xfc2f9e] PhaseIterGVN::transform_old(Node*)+0x12e V [libjvm.dylib+0xfc2916] PhaseIterGVN::optimize()+0x146 V [libjvm.dylib+0x6373df] Compile::Optimize()+0x1ff V [libjvm.dylib+0x635be7] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x1a77 V [libjvm.dylib+0x51c867] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x167 V [libjvm.dylib+0x65487b] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x63b V [libjvm.dylib+0x654038] CompileBroker::compiler_thread_loop()+0x288 V [libjvm.dylib+0xa1f158] JavaThread::thread_main_inner()+0x288 V [libjvm.dylib+0x120fac7] Thread::call_run()+0x177 V [libjvm.dylib+0xf68e5f] thread_native_entry(Thread*)+0x14f C [libsystem_pthread.dylib+0x68fc] _pthread_start+0xe0 C [libsystem_pthread.dylib+0x2443] thread_start+0xf
01-12-2022

Also redo JDK-8297556 and JDK-8297343
01-12-2022