On Mon, 19 Oct 2026 22:50:22 GMT, Satyen Subramaniam <[email protected]> 
wrote:

> Fixing incorrectly generated header for `jfif-and-exif.jpg` to support JDK 
> built with `--with-libjpeg=system`. 
> 
> The test fixture jfif-and-exif.jpg (added by JDK-8160327) currently is a 
> malformed JPEG. Builds that bundle OpenJDK's libjpeg pass because the 
> jdmarker.c leniency patch (JDK-4511441) lets the reader skip the resulting 
> bogus marker and resync. Builds configured --with-libjpeg=system reject it 
> with `javax.imageio.IIOException: Unsupported marker type 0xf7`
> 
> The core of the issues seems to be a stale test resource, not a product bug. 
> JDK-8351110 later added a guard to the JFIF writer so it can no longer emit a 
> thumbnail that overflows the header length, which confirms the checked-in 
> fixture is invalid. Here I'm regenerating the header correctly and fixing the 
> test size.
> 
> Testing:
> * GHA Sanity Checks
> * Adjusted `JpegExifThumbnailTest.java` test using builds with and without 
> `--with-libjpeg=system`
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has been closed without being integrated.

-------------

PR: https://git.openjdk.org/jdk/pull/33452

Reply via email to