Via Magnus Ihse Bursie
The following build error when building zero in jdk/jdk:
workspace/build/linux-x64-zero/hotspot/variant-zero/libjvm/objs/os_linux.o: In function `os::abort(bool, void*, void const*)':
workspace/open/src/hotspot/os/linux/os_linux.cpp:1358: undefined reference to `ClassLoader::close_jrt_image()'
collect2: error: ld returned 1 exit status
lib/CompileJvm.gmk:172: recipe for target 'workspace/build/linux-x64-zero/support/modules_libs/java.base/server/libjvm.so' failed
The implementation of close_jrt_image is ifdef'd off for zero, but the call
is unguarded.
Suggested fix:
diff --git a/src/hotspot/os/linux/os_linux.cpp b/src/hotspot/os/linux/os_linux.cpp
--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -1354,9 +1354,11 @@
void os::abort(bool dump_core, void* siginfo, const void* context) {
os::shutdown();
if (dump_core) {
+#ifndef ZERO
if (UseSharedSpaces && DumpPrivateMappingsInCore) {
ClassLoader::close_jrt_image();
}
+#endif
#ifndef PRODUCT
fdStream out(defaultStream::output_fd());
out.print_raw("Current thread is ");