OpenJDK / jdk / jdk
changeset 59192:3f571766f343
8244495: Some jlink tests crash on Windows after JDK-8237750
Summary: 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
author | minqi |
---|---|
date | Wed, 06 May 2020 19:43:57 -0700 |
parents | 26dce8fa0588 |
children | f47ca84080e7 |
files | src/java.base/share/native/libjimage/imageDecompressor.cpp |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.base/share/native/libjimage/imageDecompressor.cpp Thu May 07 03:18:49 2020 +0200 +++ b/src/java.base/share/native/libjimage/imageDecompressor.cpp Wed May 06 19:43:57 2020 -0700 @@ -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 @@ #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;