JDK build fails in making `generate-link-opt-data` target when a few JDK classes are converted to primitive classes - reproduce with the attach refval.patch.
$ build/macosx-x86_64-server-release/support/interim-image/bin/java -Xshare:dump -XX:SharedClassListFile=${BUILD_OUTPUT}/support/link_opt/classlist.interim -XX:SharedArchiveFile=${BUILD_OUTPUT}/support/link_opt/classlist.jsa -Xmx128M -Xms128M
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (synchronizer.cpp:834), pid=40555, tid=15875
# Error: ShouldNotReachHere()
#
# JRE version: Java(TM) SE Runtime Environment (18.0) (build 18-internal+0-adhoc.mlchung.open)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (18-internal+0-adhoc.mlchung.open, interpreted mode, tiered, compressed oops, compressed class ptrs, g1 gc, bsd-amd64)
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#