When running with ubsan enabled binaries, the following error occurs in some jtreg tests :
/jdk/src/hotspot/share/cds/classListParser.hpp:159:12: runtime error: load of value 2101478704, which is not a valid value for type 'ParseMode'
#0 0x7fff7920f3dc in ClassListParser::ClassListParser(char const*, ClassListParser::ParseMode) (/images/jdk/lib/server/libjvm.so+0x534f3dc)
#1 0x7fff7af824b8 in MetaspaceShared::preload_classes(JavaThread*) (/images/jdk/lib/server/libjvm.so+0x70c24b8)
#2 0x7fff7af8ffa8 in MetaspaceShared::preload_and_dump_impl(JavaThread*) (/images/jdk/lib/server/libjvm.so+0x70cffa8)
#3 0x7fff7af90978 in MetaspaceShared::preload_and_dump() (/images/jdk/lib/server/libjvm.so+0x70d0978)
#4 0x7fff7bf4c7f4 in Threads::create_vm(JavaVMInitArgs*, bool*) (/images/jdk/lib/server/libjvm.so+0x808c7f4)
#5 0x7fff7a5620b4 in JNI_CreateJavaVM (/images/jdk/lib/server/libjvm.so+0x66a20b4)
#6 0x7fff81073068 in InitializeJVM /jdk/src/java.base/share/native/libjli/java.c:1550
#7 0x7fff81073068 in JavaMain /jdk/src/java.base/share/native/libjli/java.c:491
#8 0x7fff8107ef1c in ThreadJavaMain /jdk/src/java.base/unix/native/libjli/java_md.c:642
#9 0x7fff80f99714 in start_thread (/lib64/libpthread.so.0+0x9714)
#10 0x7fff8034b774 in __GI___clone (/lib64/libc.so.6+0x13b774)
Seems _parse_mode is initialized too late.
/jdk/src/hotspot/share/cds/classListParser.hpp:159:12: runtime error: load of value 2101478704, which is not a valid value for type 'ParseMode'
#0 0x7fff7920f3dc in ClassListParser::ClassListParser(char const*, ClassListParser::ParseMode) (/images/jdk/lib/server/libjvm.so+0x534f3dc)
#1 0x7fff7af824b8 in MetaspaceShared::preload_classes(JavaThread*) (/images/jdk/lib/server/libjvm.so+0x70c24b8)
#2 0x7fff7af8ffa8 in MetaspaceShared::preload_and_dump_impl(JavaThread*) (/images/jdk/lib/server/libjvm.so+0x70cffa8)
#3 0x7fff7af90978 in MetaspaceShared::preload_and_dump() (/images/jdk/lib/server/libjvm.so+0x70d0978)
#4 0x7fff7bf4c7f4 in Threads::create_vm(JavaVMInitArgs*, bool*) (/images/jdk/lib/server/libjvm.so+0x808c7f4)
#5 0x7fff7a5620b4 in JNI_CreateJavaVM (/images/jdk/lib/server/libjvm.so+0x66a20b4)
#6 0x7fff81073068 in InitializeJVM /jdk/src/java.base/share/native/libjli/java.c:1550
#7 0x7fff81073068 in JavaMain /jdk/src/java.base/share/native/libjli/java.c:491
#8 0x7fff8107ef1c in ThreadJavaMain /jdk/src/java.base/unix/native/libjli/java_md.c:642
#9 0x7fff80f99714 in start_thread (/lib64/libpthread.so.0+0x9714)
#10 0x7fff8034b774 in __GI___clone (/lib64/libc.so.6+0x13b774)
Seems _parse_mode is initialized too late.