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
8241370: Crash in JPEGImageLoader after fix for JDK-8212034 #154
Conversation
👋 Welcome back arapte! A progress list of the required criteria for merging this PR into |
Webrevs
|
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.
The fix looks good. I can also confirm that the test fails (crashes) without your fix and passes with your fix.
The new LoadCorruptJPEGTest.java test doesn't use Robot, so it should be moved to a package not underneath test.robot
. For consistency with similar tests in javafx.graphics
, I recommend test.com.sun.javafx.iio
.
I left a few other comments on the test.
tests/system/src/test/java/test/robot/javafx/iio/LoadCorruptJPEGTest.java
Outdated
Show resolved
Hide resolved
tests/system/src/test/java/test/robot/javafx/iio/LoadCorruptJPEGTest.java
Outdated
Show resolved
Hide resolved
tests/system/src/test/java/test/robot/javafx/iio/LoadCorruptJPEGTest.java
Outdated
Show resolved
Hide resolved
tests/system/src/test/java/test/robot/javafx/iio/LoadCorruptJPEGTest.java
Outdated
Show resolved
Hide resolved
@johanvos This is a simple enough fix that I don't think it needs a second reviewer. Feel free to review it if you like. |
@arapte This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 9 commits pushed to the ➡️ To integrate this PR with the above commit message, type |
/integrate |
@arapte The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts. Pushed as commit 5906521. |
This is a regression of JDK-8212034.
When image is loaded in WebView usinga url, WebView attempts to load a image frames with partial image data. This was implemented under,
JDK-8153148 -> WCImageDecoderImpl.addImageData() -> calls loadFrames() with partial image data.
Call to jpeg_read_header() may fail when the partial image data has incomplete header information.
In the given case the jpeg_read_header() call fails and code execution flow enters the 'if (setjmp(jerr->setjmp_buffer)) {}' block and results in call to disposeIIO(env, data);, which in turn calls imageio_dispose. This will free cinfo->err and set it to NULL, and the subsequent call to (*cinfo->err->format_message) crashes.
Verified All test run, Sanity tests with Ensemble app and Tested different web pages.
Added a test, The test passes with fix and causes a native crash without the fix.
Progress
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jfx pull/154/head:pull/154
$ git checkout pull/154