Skip to content

Publish per-case large-file fixtures as prerelease assets - #233

Merged
danoli3 merged 4 commits into
masterfrom
test/io64-release-fixtures
Oct 28, 2026
Merged

danoli3 merged 4 commits into
masterfrom
test/io64-release-fixtures

Conversation

@danoli3

@danoli3 danoli3 commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Large-file regression inputs should live in versioned release assets, with each test downloading and removing only its own payload. This PR adds a deterministic generator for 91 synthetic TIFF/BigTIFF, PNG and BMP cases, including offsets above 2 GiB/4 GiB, malformed input, high-offset Exif/thumbnails, and multilingual nested paths.

After this PR merges to master, the workflow validates packaging on Linux, macOS and Windows, then publishes test-fixtures-io64-v1 as a prerelease that is never marked latest. Each fixture is a separate sparse .tar.gz asset; the 91 payloads total about 26 KB despite representing roughly 30 GiB of logical file data. The manifest records individual hashes and expected results. Existing published versions are checked and never overwritten.

The runner downloads, verifies, extracts and tests one case at a time, then removes its download and image before the next case, including after failure or timeout. It explicitly marks sparse files on Windows. No image binaries are committed. This is a standalone prerequisite for the loader work on #197/#205; it does not change the loading APIs.

Four malformed strip/offset cases currently return a bitmap on the unmodified #197 head. Their intended result remains rejection, and the manifest records those known baseline behaviors rather than treating them as passing rejection tests.

Validation:

  • All 15 local packaging, determinism, checksum, sparse extraction, Unicode-path and cleanup tests pass, including native macOS bsdtar and GNU tar 1.35 compatibility.
  • All 91 recorded decoder behaviors were checked using an ASan build of the Add additive 64-bit TIFF input API #197 TIFF path and existing PNG/BMP loaders, with no ASan reports. This includes the four documented acceptance bugs, not a claim that all malformed inputs are rejected.
  • Workflow YAML parses and the publication shell script passes bash -n.
  • The PR workflow checks packaging on Linux, macOS and Windows; release publication only runs on master after merge or manual dispatch.

@danoli3

danoli3 commented Oct 28, 2026

Copy link
Copy Markdown
Owner Author

Payload inventory for test-fixtures-io64-v1: 91 separate assets, 25,678 compressed bytes total, representing 32,212,297,622 logical uncompressed bytes (about 30.0 GiB). The payload column names the image inside its individual archive; manifest.json maps that name to the release asset and SHA-256. Assets publish after this PR merges.

Decoder results below are from macOS ASan verification of the #197 TIFF path and existing PNG/BMP loaders. The same four acceptance failures were reproduced against the unmodified #197 head, 6c964f35ab21b69fbfae4265e81c3f3df3bf8fd5: 87 meet the intended expectation; 4 return a bitmap when malformed input should be rejected. These four are recorded as known failures, not passing rejection tests. Windows Unicode decoder coverage belongs to the separate loader PR.

All 15 packaging, sparse extraction and per-case cleanup tests pass on Linux, macOS and Windows (workflow run). The runner downloads/extracts one payload, tests it, and removes it before the next case, including after failures/timeouts. Sizes below are logical file lengths; sparse extraction uses far less physical disk space.

Payload (inside its individual asset) Type Uncompressed bytes Test / expected behavior Observed macOS decoder result
broken/bigtiff-strip-past-eof.tif BigTIFF, LE 1,024 Reject strip offset beyond EOF FAIL — returned a bitmap; expected rejection
broken/bigtiff-truncated-strip-above-4g.tif BigTIFF, LE 4,294,971,394 Reject short pixel strip beyond 4 GiB FAIL — returned a bitmap; expected rejection
broken/bmp-offset-past-eof.bmp BMP 58 Reject BMP pixel offset beyond 2 GiB / EOF FAIL — returned a bitmap; expected rejection
broken/classic-truncated-strip-above-2g.tif TIFF, LE 2,147,487,746 Reject short pixel strip beyond 2 GiB FAIL — returned a bitmap; expected rejection
broken/bigtiff-truncated-ifd-above-4g.tif BigTIFF, LE 4,294,967,314 Reject truncated IFD beyond 4 GiB PASS — rejected
broken/bmp-empty.bmp BMP 0 Reject empty PASS — rejected
broken/bmp-truncated-header.bmp BMP 7 Reject truncated header PASS — rejected
broken/bmp-truncated-pixels.bmp BMP 29 Reject truncated pixels PASS — rejected
broken/empty.tif TIFF (malformed) 0 Reject empty PASS — rejected
broken/ifd-outside-int64.tif BigTIFF, LE 16 Reject absolute IFD offset above INT64_MAX PASS — rejected
broken/ifd-past-eof.tif BigTIFF, LE 16 Reject IFD offset beyond EOF PASS — rejected
broken/invalid-offset-width.tif BigTIFF, LE 16 Reject invalid BigTIFF offset-width field PASS — rejected
broken/overflowing-ifd-count.tif BigTIFF, LE 24 Reject overflowing IFD entry count PASS — rejected
broken/png-empty.png PNG 0 Reject empty PASS — rejected
broken/png-truncated-header.png PNG 7 Reject truncated header PASS — rejected
broken/png-truncated-pixels.png PNG 36 Reject truncated pixels PASS — rejected
broken/truncated-header.tif BigTIFF, LE 7 Reject truncated header PASS — rejected
broken/truncated-ifd.tif BigTIFF, LE 18 Reject truncated ifd PASS — rejected
broken/wrong-magic.tif TIFF (malformed) 16 Reject wrong magic PASS — rejected
broken/zero-height.tif BigTIFF, LE 1,027 Reject zero height PASS — rejected
broken/zero-width.tif BigTIFF, LE 1,027 Reject zero width PASS — rejected
paths/combining-é/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/combining-é/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/combining-é/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/combining-é/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/combining-é/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/combining-é/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/emoji-🧪/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/emoji-🧪/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/emoji-🧪/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/emoji-🧪/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/emoji-🧪/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/emoji-🧪/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/spaces in name/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/spaces in name/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/spaces in name/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/spaces in name/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/spaces in name/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/spaces in name/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Ελληνικά/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Ελληνικά/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Ελληνικά/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Ελληνικά/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Ελληνικά/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Ελληνικά/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Кириллица/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Кириллица/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Кириллица/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/Кириллица/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Кириллица/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/Кириллица/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/العربية/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/العربية/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/العربية/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/العربية/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/العربية/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/العربية/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/हिन्दी/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/हिन्दी/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/हिन्दी/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/हिन्दी/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/हिन्दी/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/हिन्दी/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/中文/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/中文/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/中文/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/中文/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/中文/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/中文/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/日本語/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/日本語/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/日本語/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/日本語/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/日本語/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/日本語/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/한국어/broken image.bmp BMP 6 Reject malformed content at nested multilingual path PASS — rejected
paths/한국어/broken image.png PNG 6 Reject malformed content at nested multilingual path PASS — rejected
paths/한국어/broken image.tif TIFF (malformed) 6 Reject malformed content at nested multilingual path PASS — rejected
paths/한국어/valid image.bmp BMP 58 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/한국어/valid image.png PNG 72 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
paths/한국어/valid image.tif TIFF, LE 1,027 Decode 1×1 RGB at nested multilingual path PASS — 1×1 RGB pixel verified
valid/bigtiff-big-endian-above-4g.tif BigTIFF, BE 4,294,971,395 Decode big-endian IFD and strip beyond 4 GiB PASS — 1×1 RGB pixel verified
valid/bigtiff-ifd-exif-thumbnail-above-4g.tif BigTIFF, LE 4,294,972,419 Decode IFD, pixels, Exif and thumbnail beyond 4 GiB PASS — pixels, Exif and thumbnail verified
valid/bigtiff-small.tif BigTIFF, LE 1,027 Decode BigTIFF control image PASS — 1×1 RGB pixel verified
valid/bigtiff-strip-above-4g.tif BigTIFF, LE 4,294,971,395 Decode pixel strip beyond 4 GiB PASS — 1×1 RGB pixel verified
valid/classic-big-endian-above-2g.tif TIFF, BE 2,147,487,747 Decode big-endian strip beyond 2 GiB PASS — 1×1 RGB pixel verified
valid/classic-small.tif TIFF, LE 1,027 Decode classic TIFF control image PASS — 1×1 RGB pixel verified
valid/classic-strip-above-2g.tif TIFF, LE 2,147,487,747 Decode pixel strip beyond 2 GiB PASS — 1×1 RGB pixel verified
valid/classic-strip-below-4g.tif TIFF, LE 4,294,963,203 Decode pixel strip just below 4 GiB PASS — 1×1 RGB pixel verified
valid/small.bmp BMP 58 Decode BMP through existing loader PASS — 1×1 RGB pixel verified
valid/small.png PNG 72 Decode PNG through existing loader PASS — 1×1 RGB pixel verified

@danoli3
danoli3 merged commit 9a22df4 into master Oct 28, 2026
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant