RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v5]
Alexey Ivanov
aivanov at openjdk.java.net
Fri Dec 10 17:31:13 UTC 2021
On Tue, 7 Dec 2021 19:52:50 GMT, Alexander Zuev <kizune at openjdk.org> wrote:
>> Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack.
>> Added regression test.
>
> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
>
> Reformat the code getting rid of the sectnd try block
I admit I prefer the 2nd version with two try-catch blocks better because it avoids using if's completely.
Anyway, this version looks good to me. Thanks.
src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1083:
> 1081: maskBits = (long*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long));
> 1082:
> 1083: GetDIBits(dc, iconInfo.hbmMask, 0, iconSize, maskBits, &bmi, DIB_RGB_COLORS);
Probably the empty lines here aren't necessary.
-------------
Marked as reviewed by aivanov (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/6473
More information about the client-libs-dev
mailing list