Repository navigation
Floor Pillow at 10.2 so the bundled libjpeg-turbo cannot corrupt thumbnails - #24
Merged
Merged
Conversation
…bnails Pillow 10.0.1 and 10.1.0 wheels for macOS arm64 bundle libjpeg-turbo 3.0.0 built without SIMD. That release allocates its Huffman encoder state without zeroing it, sets the simd flag only when SIMD is compiled in, and still branches on the flag in flush_bits, so on AArch64 a stale nonzero byte flushes the bit buffer with the wrong count. Measured: a white 4x4, 16x16, 48x36 or 48x48 tile encodes to one of two byte streams, about a coin flip per call, one correct and one with the leading bits wrong, in RGB and L mode and at 4:4:4 and 4:2:0. Headers identical, only the scan differs. Pillow 10.2.0 is the first wheel with libjpeg-turbo 3.0.1, where the branch is compiled out; 10.2.0 through 12.3.0 give the correct stream 20 of 20 times. Adds a test that encodes a white tile forty times through make_image_thumb and requires one byte stream that decodes white, which fails deterministically on an affected build and passes on 10.2 and later. Corrects the comment in the archive-reference test that blamed the partial macroblock and restores the pixel comparison there. Records the measurement in the cross-platform rules. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Floors Pillow at 10.2 in requirements.txt and pyproject.toml.
🤖 Generated with Claude Code