Skip to content
Permalink
Browse files
8244495: Some jlink tests crash on Windows after JDK-8237750
Fix of 8237750 changed the loading zip library to on-demand loading, on Windows, jlink/jimage still assume that zip has been loaded already. Fix to load zip on not loaded.

Reviewed-by: kbarrett, mchung, dholmes, dcubed
  • Loading branch information
yminqi committed May 7, 2020
1 parent 6dd8443 commit 0ef6d1dff53d0ba2c2cd710c82b33266f0caa02d
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/java.base/share/native/libjimage/imageDecompressor.cpp
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -61,7 +61,10 @@ static void* findEntry(const char* name) {
#ifdef WIN32
HMODULE handle = GetModuleHandle("zip.dll");
if (handle == NULL) {
return NULL;
handle = LoadLibrary("zip.dll");
}
if (handle == NULL) {
return NULL;
}
addr = (void*) GetProcAddress(handle, name);
return addr;

0 comments on commit 0ef6d1d

Please sign in to comment.