United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7153693 Three 2D_ImageIO tests failed due ImageFormatException on OEL 6.* Unbreakable Kernel x64
JDK-7153693 : Three 2D_ImageIO tests failed due ImageFormatException on OEL 6.* Unbreakable Kernel x64

Details
Type:
Bug
Submit Date:
2012-03-14
Status:
Closed
Updated Date:
2012-07-31
Project Name:
JDK
Resolved Date:
2012-07-31
Component:
client-libs
OS:
linux
Sub-Component:
2d
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u33,7u4
Fixed Versions:
7u6 (b17)

Related Reports
Backport:

Sub Tasks

Description
Three 2D_ImageIO tests failed due ImageFormatException on OEL 6.* Unbreakable Kernel x64
on JDK 7 u04 b13 
See more in comments

                                    

Comments
EVALUATION

This problem is caused by a failure in Toolkit image decoder: for some reasons,
the jpeg decoder fails to read a certain file multicolor.jpg. The problem happens
occasionally and seems to be caused by a peculiarity of file i/o buffering
on the OEL6 system. Simplified testcase either fails with the exception listed
in the description, or reads the image successfully. Also, if image data are
explicitly buffered in a memory buffer, the reading success always.

Note that this is not a regression: the jdk6 demonstrates the same behavior.
So the problematic code seems to be present in jdk for a long period of time.
                                     
2012-03-21
EVALUATION

This problem is caused by incorrect usage of memcpy routine in sun_jpeg_fill_suspended_buffer:
The linux man for memcpy says:
"The memory areas must not overlap. Use memmove(3) if the memory areas do overlap."

This is exactly the case of the sun_jpeg_fill_suspended_buffer, were we move overlapped
memory areas under some conditions. Some linux systems are tolerant to the problem,
but OEL 6.* Unbreakable Kernel x64 is not, so the problem is visible there, and  manifests
in occasional  failures during decoding of progressive jpegs.

Suggested fix is just use memmove instead of memcpy.
                                     
2012-06-09
SUGGESTED FIX

http://cr.openjdk.java.net/~bae/7153693/7u6/webrev.00/
                                     
2012-06-15



Hardware and Software, Engineered to Work Together