Run this to reproduce the crash:
./java -XX:TypeProfileArgsLimit=0 -XX:TypeProfileLevel=222 --version
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/c1_LIRGenerator.cpp:3074
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/emanuel/Documents/fork2-jdk/open/src/hotspot/share/c1/c1_LIRGenerator.cpp:3074), pid=2038898, tid=2038912
# assert(MethodData::profile_parameters() && (MethodData::profile_arguments_jsr292_only() || (x->inlined() && ((code == Bytecodes::_invokedynamic && n <= 1) || (code == Bytecodes::_invokehandle && n <= 2))))) failed: only at JSR292 bytecodes
#
# JRE version: Java(TM) SE Runtime Environment (20.0) (slowdebug build 20-internal-2022-10-06-1045569.emanuel...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 20-internal-2022-10-06-1045569.emanuel..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x7016b0] LIRGenerator::profile_arguments(ProfileCall*)+0x660
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/core.2038898)
#
# An error report file with more information is saved as:
# /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/hs_err_pid2038898.log
[thread 2038914 also had an error]
[thread 2038916 also had an error]
[thread 2038915 also had an error]
java 20-internal 2023-03-21
Java(TM) SE Runtime Environment (slowdebug build 20-internal-2022-10-06-1045569.emanuel...)
Java HotSpot(TM) 64-Bit Server VM (slowdebug build 20-internal-2022-10-06-1045569.emanuel..., mixed mode)
#
# Compiler replay data is saved as:
# /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/replay_pid2038898.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)
./java -XX:TypeProfileArgsLimit=0 -XX:TypeProfileLevel=222 --version
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc: SuppressErrorAt=/c1_LIRGenerator.cpp:3074
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (/home/emanuel/Documents/fork2-jdk/open/src/hotspot/share/c1/c1_LIRGenerator.cpp:3074), pid=2038898, tid=2038912
# assert(MethodData::profile_parameters() && (MethodData::profile_arguments_jsr292_only() || (x->inlined() && ((code == Bytecodes::_invokedynamic && n <= 1) || (code == Bytecodes::_invokehandle && n <= 2))))) failed: only at JSR292 bytecodes
#
# JRE version: Java(TM) SE Runtime Environment (20.0) (slowdebug build 20-internal-2022-10-06-1045569.emanuel...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 20-internal-2022-10-06-1045569.emanuel..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x7016b0] LIRGenerator::profile_arguments(ProfileCall*)+0x660
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport -p%p -s%s -c%c -d%d -P%P -u%u -g%g -- %E" (or dumping to /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/core.2038898)
#
# An error report file with more information is saved as:
# /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/hs_err_pid2038898.log
[thread 2038914 also had an error]
[thread 2038916 also had an error]
[thread 2038915 also had an error]
java 20-internal 2023-03-21
Java(TM) SE Runtime Environment (slowdebug build 20-internal-2022-10-06-1045569.emanuel...)
Java HotSpot(TM) 64-Bit Server VM (slowdebug build 20-internal-2022-10-06-1045569.emanuel..., mixed mode)
#
# Compiler replay data is saved as:
# /home/emanuel/Documents/fork2-jdk/build/linux-x64-slowdebug/jdk/bin/JTwork/scratch/replay_pid2038898.log
#
# If you would like to submit a bug report, please visit:
# https://bugreport.java.com/bugreport/crash.jsp
#
Aborted (core dumped)