Skip to content

Test: regression for XML zero (NoData) colour-space round-trip corruption (#1356)#1358

Merged
xsscx merged 1 commit into
InternationalColorConsortium:masterfrom
colourbill-ctrl:test-1356-xml-colorspace-null-roundtrip
Jun 15, 2026
Merged

Test: regression for XML zero (NoData) colour-space round-trip corruption (#1356)#1358
xsscx merged 1 commit into
InternationalColorConsortium:masterfrom
colourbill-ctrl:test-1356-xml-colorspace-null-roundtrip

Conversation

@colourbill-ctrl

Copy link
Copy Markdown
Contributor

Summary

Paired regression test for #1356. Round-trips a profile whose data colour space is 0x00000000 (NoData) through iccToXml -> iccFromXml and fails if the value is corrupted to 0x4E554C4C.

Before the #1356 fix, CIccProfileXml::ToXml() wrote the literal NULL for a zero data colour space / PCS signature; iccFromXml then reparsed NULL to 0x4E554C4C (the ASCII bytes N,U,L,L), so a NoData header became Unknown 'NULL' = 4E554C4C after a round-trip — the sole reason iccFromXml and iccFromJson disagreed on the same profile.

What it checks

  1. iccToXml must not emit <DataColourSpace>NULL</DataColourSpace> for a zero signature.
  2. After iccFromXml, the data colour space must still report NoData, not 0x4E554C4C / Unknown 'NULL'.

Plain functional round-trip test (no sanitizer build needed); skips cleanly when iccToXml/iccFromXml/iccDumpProfile or the fixture are unavailable, and skips vacuously if the fixture is somehow not a NoData profile.

Verification

Build Result
master (no fix) FAIL, exit 2 (<DataColourSpace>NULL</DataColourSpace>, round-trip → 4E554C4C)
with #1356 PASS, exit 0 (round-trip preserves NoData)

Files

  • .github/scripts/iccdev-issue-1356-xml-colorspace-null-roundtrip-regression.sh
  • .github/ci/test-data/nodata-colourspace-1356.icc — the LCDDisplayCat8Obs.icc profile from Research: File LCDDisplayCat8Obs.icc #1355 (data colour space 0x00000000)
  • Build/Cmake/Testing/CMakeLists.txt — CTest registration (iccdev.issue-1356-xml-colorspace-null-roundtrip-regression)

⚠️ Merge order: depends on the writer fix in #1356 — this test is expected to be red until #1356 lands on master. Merge #1356 first, then rebase/merge this.

🤖 Generated with Claude Code

…tion (InternationalColorConsortium#1356)

Round-trips a profile whose data colour space is 0x00000000 (NoData) through
iccToXml -> iccFromXml and fails if the value is corrupted to 0x4E554C4C.

Before the InternationalColorConsortium#1356 fix, CIccProfileXml::ToXml() wrote the literal "NULL" for a
zero data colour space / PCS signature; iccFromXml then reparsed "NULL" to
0x4E554C4C (the ASCII bytes 'N','U','L','L'), so a NoData header became
"Unknown 'NULL' = 4E554C4C" after a round-trip -- the sole reason iccFromXml
and iccFromJson disagreed on the same profile.

The script asserts both that iccToXml does not emit
<DataColourSpace>NULL</DataColourSpace> and that the round-tripped profile
still reports NoData. Verified to FAIL on master (exit 2) and PASS once the
InternationalColorConsortium#1356 writer guard lands. Plain functional test; skips cleanly when the tools
or fixture are unavailable.

Fixture: .github/ci/test-data/nodata-colourspace-1356.icc is the
LCDDisplayCat8Obs.icc profile from the issue (data colour space 0x00000000).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Testing CTest, regression, or test coverage Scripts Shell, PowerShell, or repository automation scripts Configuration Repository, CMake, YAML, JSON, or tool configuration Build Build system, CMake, compiler, or packaging Unix Linux, macOS, Bash, or POSIX shell scope labels Jun 15, 2026

@xsscx xsscx left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2026-06-15 18:10:59 UTC

@xsscx xsscx enabled auto-merge (squash) June 15, 2026 18:11
@xsscx xsscx added this to the v2.3.2.2 milestone Jun 15, 2026
@xsscx xsscx linked an issue Jun 15, 2026 that may be closed by this pull request
@xsscx xsscx merged commit f685c40 into InternationalColorConsortium:master Jun 15, 2026
31 checks passed
@xsscx xsscx mentioned this pull request Jun 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Build Build system, CMake, compiler, or packaging Configuration Repository, CMake, YAML, JSON, or tool configuration Scripts Shell, PowerShell, or repository automation scripts Testing CTest, regression, or test coverage Unix Linux, macOS, Bash, or POSIX shell scope

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Research: File LCDDisplayCat8Obs.icc

2 participants