Skip to content

Test: regression for CIccCmm::CheckPCSConnections CIccPcsXform leak (#1337)#1341

Merged
xsscx merged 3 commits into
masterfrom
test-1337-checkpcsconnections-regression
Jun 14, 2026
Merged

Test: regression for CIccCmm::CheckPCSConnections CIccPcsXform leak (#1337)#1341
xsscx merged 3 commits into
masterfrom
test-1337-checkpcsconnections-regression

Conversation

@colourbill-ctrl

Copy link
Copy Markdown
Contributor

Summary

Adds a deterministic CTest regression for the CIccCmm::CheckPCSConnections CIccPcsXform leak fixed in #1338 (issue #1337). On an upstream branch because it touches .github/scripts/ + Build/Cmake/.

This fills the gap noted on #1338 (which shipped without a repro because the triggering chain lived only in the uncommitted 200-QA script). With that script now attached to #1337, I isolated a minimal, -PCC-free trigger — so this test is independent of the #1336 / #1339 fix.

What it does

Generates two profiles from committed XML (Testing/hybrid/CMYK-W_Overprint_Profile.xml, Testing/hybrid/Data/Spec380_10_730-D50_2deg.xml) and chains them:

iccApplyToLink <out>.cube 1 9 10 Issue1337 0.001 0.999 1 1 \
  <CMYK-W>.icc 1000 <Spec380>.icc 12

The CMYK→spectral PCS link is unsupported, so CheckPCSConnections' middle CIccPcsXform/Connect() fails (icCmmStatUnsupportedPcsLink) and — pre-fix — leaks the CIccPcsXform. Run under LeakSanitizer, the test fails on any leak report. The tool is expected to exit non-zero ("Unsupported PCS Link used"), so the pass/fail signal is the absence of a leak.

Verification

Context: full 200-QA sweep

Running the attached iccApplyToLink_QA_200.txt under LSan on master: 148 of 200 commands leak. With #1338 + #1339 applied, all 148 → 0 (the deeper Begin()-time sites were indirect children of the leaked -PCC profile / CIccPcsXform). This test pins the CheckPCSConnections half; #1340 pins the iccApplyToLink -PCC half.

Maintainer note — pairs with #1338. Merge #1338 first, then this PR (red until then by design). Hosted upstream because the fork-PR automation gate forbids fork PRs from .github/Build/Cmake.

🤖 Generated with Claude Code

…1337)

Adds a script CTest that reproduces the #1337 leak in isolation (no -PCC, so
independent of the #1336 iccApplyToLink fix): two profiles generated from
committed XML (a CMYK overprint profile chained to a spectral profile) form an
unsupported PCS link, so CheckPCSConnections' middle CIccPcsXform Connect()
fails. Run under LeakSanitizer the pre-fix build leaks 168 B via
CheckPCSConnections; the test fails on any leak report.

The tool is expected to exit non-zero ("Unsupported PCS Link used"), so the
pass/fail signal is the absence of a leak. Verified failing pre-fix and passing
with the #1338 fix, on both gcc and clang.

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 14, 2026
@colourbill-ctrl

Copy link
Copy Markdown
Contributor Author

Maintainer note — pairs with #1338. Merge #1338 first, then this PR. Expected red until then (branched off master without the fix; the CTest reproduces the 168-byte CheckPCSConnections leak). Upstream branch because the fork gate blocks fork PRs from .github/Build/Cmake.

@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-14 04:52:12 UTC

@xsscx xsscx removed request for dwtza and maxderhak June 14, 2026 04:53
@github-actions github-actions Bot added failed One or more CI checks failed and removed pending CI checks still running labels Jun 14, 2026
@xsscx

xsscx commented Jun 14, 2026

Copy link
Copy Markdown
Member

Job Failure

2026-06-14 04:55:00 UTC

The following tests FAILED:
Errors while running CTest
	 21 - iccdev.issue-1337-checkpcsconnections-regression (Failed)
Error: Process completed with exit code 8.

@xsscx xsscx added this to the v2.3.2.2 milestone Jun 14, 2026
@xsscx xsscx linked an issue Jun 14, 2026 that may be closed by this pull request
@xsscx xsscx self-requested a review June 14, 2026 19:10

@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.

Job Failure

2026-06-14 04:55:00 UTC

The following tests FAILED:
Errors while running CTest
21 - iccdev.issue-1337-checkpcsconnections-regression (Failed)
Error: Process completed with exit code 8.

@colourbill-ctrl

Copy link
Copy Markdown
Contributor Author

Same pattern as #1340: the only failing check (CTest ASAN+UBSANiccdev.issue-1337-checkpcsconnections-regression) is the regression correctly detecting the unfixed CIccPcsXform leak on master. All other checks pass.

It flips green once the paired fix #1338 is merged. Suggested order: merge #1338 (fix) → re-run → merge #1341 (test).

@github-actions github-actions Bot added pending CI checks still running and removed failed One or more CI checks failed labels Jun 14, 2026
@xsscx

xsscx commented Jun 14, 2026

Copy link
Copy Markdown
Member

@colourbill-ctrl #1338 is Merged but latest Jon indicates Fail

@github-actions github-actions Bot removed the pending CI checks still running label Jun 14, 2026
@github-actions github-actions Bot added the failed One or more CI checks failed label Jun 14, 2026
@colourbill-ctrl

Copy link
Copy Markdown
Contributor Author

Same cause as #1340, @xsscx — stale branch, not a real leak. This branch predated the #1338 merge, so its last CI run built the tools without the CIccPcsXform fix and the regression flagged the leak that #1338 removes.

Merged current master (now contains #1338 5355a02) into this branch and pushed; CI will rebuild with the fix.

Verified locally (clang-18, ASAN+UBSAN), fix now in tree:

Test #21: iccdev.issue-1337-checkpcsconnections-regression ... Passed  1.62 sec
100% tests passed, 0 tests failed out of 1

Should go green on the re-run.

@github-actions github-actions Bot added pending CI checks still running and removed failed One or more CI checks failed labels Jun 14, 2026
@github-actions github-actions Bot added passed All CI checks passed and removed pending CI checks still running labels Jun 14, 2026
@xsscx xsscx enabled auto-merge (squash) June 14, 2026 21:37
@xsscx xsscx self-requested a review June 14, 2026 21:40

@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-14 21:40:28 UTC
Appears to need a rebase on master

@xsscx

xsscx commented Jun 14, 2026

Copy link
Copy Markdown
Member

Merge Conflict

<<<<<<< test-1337-checkpcsconnections-regression
# Guards CIccCmm::CheckPCSConnections CIccPcsXform ownership on its Connect
# error path (#1337).  Generates two profiles from committed XML, chains them
# into an unsupported PCS link under LeakSanitizer, and fails on a leak.  No
# -PCC, so this is independent of the iccApplyToLink #1336 fix.
iccdev_add_script_test(
  iccdev.issue-1337-checkpcsconnections-regression
  120
  "iccdev;tools;cmm;leak;issue-1337;regression;asan"
  "${ICCDEV_REPO_ROOT}"
  "${ICCDEV_REPO_ROOT}/.github/scripts/iccdev-issue-1337-checkpcsconnections-regression.sh"
=======
# Guards iccApplyToLink -PCC profile ownership on its error-exit paths (#1336):
# drives the AddXform BadSpaceLink path with tracked profiles under LeakSanitizer
# and fails if a -PCC profile is stranded.  Uses committed test-data profiles, so
# no generated-profile fixture is required.
iccdev_add_script_test(
  iccdev.issue-1336-applytolink-pcc-regression
  60
  "iccdev;tools;applytolink;leak;issue-1336;regression;asan"
  "${ICCDEV_REPO_ROOT}"
  "${ICCDEV_REPO_ROOT}/.github/scripts/iccdev-issue-1336-applytolink-pcc-regression.sh"
>>>>>>> master

…onnections-regression

# Conflicts:
#	Build/Cmake/Testing/CMakeLists.txt
@github-actions github-actions Bot added pending CI checks still running and removed passed All CI checks passed labels Jun 14, 2026
@colourbill-ctrl

Copy link
Copy Markdown
Contributor Author

Resolved, @xsscx. The conflict was purely additive in Build/Cmake/Testing/CMakeLists.txt: the #1336 test (merged via #1340) and this #1337 test register adjacent iccdev_add_script_test(...) blocks. Kept both registrations. Verified the merged file configures and both tests run locally — iccdev.issue-1337-checkpcsconnections-regression Passed (fix #1338 is in master). Now mergeable.

@xsscx xsscx merged commit 4e67803 into master Jun 14, 2026
31 checks passed
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 pending CI checks still running 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.

CI c0d0fc2: Leaks to Triage using iccApplyToLink 200 QA

2 participants