zip-library handling in Hotspot
Baesken, Matthias
matthias.baesken at sap.com
Wed Apr 25 14:56:45 UTC 2018
Hello, when recently working on symbol visibility issues (in libzip and others too) after the removal of mapfiles across jdk11 ,
I thought it would be helpful to get the detailed information about missing libzip symbols not only for ZIP_InflateFully ("Corrupted ZIP library ZIP_InflateFully missing" )
But also for the other needed symbols.
Do you think it makes sense to add this small change ( a suggested diff is below ) ?
Best regards, Matthias
d040975 at ld9385:/usr/work/d040975/open_jdk/jdk_2/jdk> hg diff
diff -r b2e74972c7d4 src/hotspot/share/classfile/classLoader.cpp
--- a/src/hotspot/share/classfile/classLoader.cpp Wed Apr 25 13:54:11 2018 +0200
+++ b/src/hotspot/share/classfile/classLoader.cpp Wed Apr 25 16:39:39 2018 +0200
@@ -1195,16 +1195,17 @@
ZipInflateFully = CAST_TO_FN_PTR(ZipInflateFully_t, os::dll_lookup(handle, "ZIP_InflateFully"));
Crc32 = CAST_TO_FN_PTR(Crc32_t, os::dll_lookup(handle, "ZIP_CRC32"));
- // ZIP_Close is not exported on Windows in JDK5.0 so don't abort if ZIP_Close is NULL
if (ZipOpen == NULL || FindEntry == NULL || ReadEntry == NULL ||
- GetNextEntry == NULL || Crc32 == NULL) {
+ GetNextEntry == NULL || Crc32 == NULL || ZipInflateFully == NULL) {
+ if (ZipOpen == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZIP_Open lookup failed", path); }
+ if (FindEntry == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZIP_FindEntry lookup failed", path); }
+ if (ReadEntry == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZIP_ReadEntry lookup failed", path); }
+ if (GetNextEntry == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZIP_GetNextEntry lookup failed", path); }
+ if (Crc32 == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZIP_CRC32 lookup failed", path); }
+ if (ZipInflateFully == NULL) { tty->print_cr("Corrupted ZIP library at %s, ZipInflateFully lookup failed", path); }
vm_exit_during_initialization("Corrupted ZIP library", path);
}
- if (ZipInflateFully == NULL) {
- vm_exit_during_initialization("Corrupted ZIP library ZIP_InflateFully missing", path);
- }
-
// Lookup canonicalize entry in libjava.dll
void *javalib_handle = os::native_java_library();
CanonicalizeEntry = CAST_TO_FN_PTR(canonicalize_fn_t, os::dll_lookup(javalib_handle, "Canonicalize"));
More information about the hotspot-dev
mailing list