RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits
Alexey Ivanov
aivanov at openjdk.java.net
Fri Nov 19 20:53:10 UTC 2021
On Fri, 19 Nov 2021 06:34:30 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.
src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1059:
> 1057: // Extract the color bitmap
> 1058: int nBits = iconSize * iconSize;
> 1059: long * colorBits;
Pointer declarations aren't consistent in the file, the function parameter is declared as `JNIEnv* env`. However, in the majority of cases the asterisk is near the variable name as in `const char *pLibName`. In either case, there's only one space:
long *maskBits;
or
long* maskBits;
test/jdk/javax/swing/JFileChooser/FileSystemView/ShellFolderStackOverflow.java line 28:
> 26: * @bug 8277299
> 27: * @requires (os.family == "windows")
> 28: * @summary STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits
Maybe this could be spelt with regular case rather than caps?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6473
More information about the client-libs-dev
mailing list