-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8332866: Crash in ImageIO JPEG decoding when MEM_STATS in enabled #19386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
👋 Welcome back jdv! A progress list of the required criteria for merging this PR into |
|
@jayathirthrao 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 153 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
|
@jayathirthrao The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
kumarabhi006
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified the fix with sample test program. Looks good to me.
|
Please update the copyright year when you integrate |
|
/integrate |
|
Going to push as commit ca30726.
Your commit was automatically rebased without conflicts. |
|
@jayathirthrao Pushed as commit ca30726. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
In IJG library's jmemmgr.c file we can define MEM_STATS(by default this flag is disabled and we don't see this issue) to enable printing of memory trace logs when we have OOM. But if we enable it we get crash while disposing IJG stored objects in jmemmgr->free-pool() function.
This is happening because we delete the error handler before we actually start deleting IJG stored objects and while freeing the IJG objects we try to access cinfo->err->trace_level of error handler. This early deletion of error handler is happening in imageioJPEG.c->imageio_dispose() function.
Moved the logic to delete error handler after we are done with deleting IJG stored objects, after this change there is no crash. There is no regression test because this issue is seen only when we enable MEM_STATS flag in IJG library. Ran jtreg ImageIO tests with code update and i don't see any regressions.
I have verified that this issue doesn't effect SplashScreen code path and disposing of IJG objects is handled differently in SplashScreen.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19386/head:pull/19386$ git checkout pull/19386Update a local copy of the PR:
$ git checkout pull/19386$ git pull https://git.openjdk.org/jdk.git pull/19386/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19386View PR using the GUI difftool:
$ git pr show -t 19386Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19386.diff
Webrev
Link to Webrev Comment