RFR for JDK-8215123: Crash in runtime image built with jlink --compress=2
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Mon Dec 10 13:01:23 UTC 2018
On 2018-12-10 13:32, Alexey Ivanov wrote:
> Could you please review the following fix for jdk12?
> bug: https://bugs.openjdk.java.net/browse/JDK-8215123
> webrev: http://cr.openjdk.java.net/~aivanov/8215123/webrev.00/
The fix looks good to me.
> The problem is that calling convention was changed on ZIP_InflateFully
> function in zip.dll. Yet it hasn't been updated in jimage.dll which
> uses this function.
> It could be considered a regression from JDK-8200178  and
> JDK-8201226 . After the first fix, ZIP_InflateFully was exported
> with a mangled name so that function could not be found in zip.dll.
> After the second fix, the function uses __cdecl; mismatched calling
> convention leads to stack corruption.
> The fix is to remove JNICALL (__stdcall) from ZIP_InflateFully
> function prototype in imageDecompressor.cpp so that the calling
> convention is the same.
> This issue was brought up by Ali İnce from AdoptOpenJDK:
> Thank you in advance.
>  https://bugs.openjdk.java.net/browse/JDK-8200178
>  https://bugs.openjdk.java.net/browse/JDK-8201226
More information about the core-libs-dev