RFR(XS): 8244495: Some jlink tests crash on Windows after JDK-8237750
David Holmes
david.holmes at oracle.com
Thu May 7 02:00:54 UTC 2020
Hi Yumin,
On 7/05/2020 11:01 am, Yumin Qi wrote:
> Hi,
> Please review the fix for
> bug: https://bugs.openjdk.java.net/browse/JDK-8244495
> webrev: http://cr.openjdk.java.net/~minqi/8244495/webrev/
>
> Tests tools/jlink/JLinkTest.javaand tools/jlink/basic/BasicTest.java
> failed after 8237750 pushed. The fix of 8237750 changed default behavior
> of loading zip library to on-demand loading. jlink (and jimage) assumes
> that zip library was loaded already, so call to FindEntry caused
> ACCESS_VIOLATION on Windows. This is a Windows specific problem.
> GetModuleHandle is used on the library already loaded and won't load the
> library if it's not loaded.
Fix looks good.
I was wondering why we crashed when the method already potentially
returns NULL but I see:
88 ZipInflateFully = (ZipInflateFully_t)
findEntry("ZIP_InflateFully");
89 assert(ZipInflateFully != NULL && "ZIP decompressor not found.");
so in product builds we assume it is non-NULL and try to call it. And
unfortunately IIUC JDK tier2 tests only run on product builds - hence
why we never saw a simple and obvious assertion failure in the CI.
Thanks,
David
-----
> Tests: tier1-2 passed.
>
> Thanks
> Yumin
More information about the core-libs-dev
mailing list