JDK-8297480: GetPrimitiveArrayCritical in imageioJPEG misses result - NULL check#11312
JDK-8297480: GetPrimitiveArrayCritical in imageioJPEG misses result - NULL check#11312MBaesken wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back mbaesken! A progress list of the required criteria for merging this PR into |
|
Did we actually hit null pointer issue in some specific condition using ImageIO or this bug got identified because of some static analysis? |
I just grepped the codebase for GetPrimitiveArrayCritical usages and while doing so saw this. |
|
Thanks for the fix. Change looks good to me. |
|
Hello , I did a few more grepping and source reading and while 98 or 99 percent of the GetPrimitiveArrayCritical return values are checked, there are a few more unchecked ones. See below ` src/java.desktop/macosx/native/libawt_lwawt/font/CCharToGlyphMapper.m-54-static inline void src/java.desktop/macosx/native/libosxui/JRSUIController.m:279: jdouble *rect = (*env)->GetPrimitiveArrayCritical(env, rectArray, NULL); src/java.desktop/unix/native/libawt_xawt/awt/swing_GTKEngine.c-333-Java_com_sun_java_swing_plaf_gtk_GTKEngine_nativeFinishPainting( src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp-437- // Copy the resulting pixels to our Java BufferedImage. src/java.desktop/windows/native/libawt/windows/awt_DataTransferer.cpp-164- LOGPALETTE* pLogPalette = src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp:2863: colorsPtr = (jint *)env->GetPrimitiveArrayCritical(colors, 0); Should I open another jbs issue for them ? |
|
some tests are failing |
|
Yes some Windows tests are failing; however it seems they miss getting the BOOT JDK or other components for example so this looks not related to me. |
Sure please create new JBS issue for the same. |
|
@MBaesken This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 6 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
Thanks for the review ! /integrate |
|
Going to push as commit 2f8a5c2.
Your commit was automatically rebased without conflicts. |
Seems there is a remaining GetPrimitiveArrayCritical in imageioJPEG that misses a result - NULL check, this should be added.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11312/head:pull/11312$ git checkout pull/11312Update a local copy of the PR:
$ git checkout pull/11312$ git pull https://git.openjdk.org/jdk pull/11312/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11312View PR using the GUI difftool:
$ git pr show -t 11312Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11312.diff