The fix for JDK-8275868 only works if the class file for the method to be replay compiled is present. Otherwise, it results in a SIGSEGV because it tries to access the protection domain of a failed to load class (i.e. a NULL pointer).
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007ffff66063c6, pid=236864, tid=236868
#
# JRE version: Java(TM) SE Runtime Environment (18.0) (slowdebug build 18-internal+0-2021-11-01-1028080.christian...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (slowdebug 18-internal+0-2021-11-01-1028080.christian..., mixed mode, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
# Problematic frame:
# V [libjvm.so+0x71b3c6] CompileReplay::process_instanceKlass(JavaThread*)+0x5a