Skip to content

Test: regression for CIccXform::Create tag-overload profile ownership (#1308)#1348

Merged
xsscx merged 3 commits into
masterfrom
test-1308-create-ownership-regression
Jun 14, 2026
Merged

Test: regression for CIccXform::Create tag-overload profile ownership (#1308)#1348
xsscx merged 3 commits into
masterfrom
test-1308-create-ownership-regression

Conversation

@colourbill-ctrl

Copy link
Copy Markdown
Contributor

Summary

Deterministic CTest regression for #1308 — the tag-based CIccXform::Create overload leaking the profile it was given on failure. Pairs with fix PR #1347.

iccdev.xform-create-tag-ownership hands a valid profile plus a NULL transform tag to CIccCmm::AddXform(CIccProfile*, CIccTag*). The NULL tag forces the tag-based Create onto its failure path, which must free the owned profile. The profile is opened and passed inside a helper, so a profile Create fails to free is unreachable and reported by the at-exit LeakSanitizer scan (the iccDEV ASan CI job). A status check confirms the intended Create-failure path (BadXform) was exercised.

What's added

  • .github/ci/regression/xform-create-tag-ownership.cpp (C++ helper linking IccProfLib)
  • CMake registration iccdev.xform-create-tag-ownership (label issue-1308), using the tracked Testing/sRGB_v4_ICC_preference.icc

Verification

  • FAILS pre-fix — 608 B leaked (the profile + its 11 tag allocations)
  • PASSES post-fix (ctest -R xform-create-tag → 1/1)

Merge order

Red until #1347 (the fix) lands — same convention as prior fix/test splits. Merge #1347 first, then this.

🤖 Generated with Claude Code

…#1308)

Adds a C++ CTest regression (iccdev.xform-create-tag-ownership) that hands a
valid profile plus a NULL transform tag to CIccCmm::AddXform(CIccProfile*,
CIccTag*). The NULL tag forces the tag-based CIccXform::Create overload onto
its failure path, which must free the owned profile (#1308). The profile is
opened and passed inside a helper, so a profile Create fails to free is
unreachable and reported by the at-exit LeakSanitizer scan; the status check
confirms the intended Create-failure path (BadXform) was exercised.

Verified: FAILS pre-fix (608 B leaked via the unfreed profile + its tags),
PASSES post-fix. Pairs with the #1308 fix PR; this test stays red until that
fix lands.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added Testing CTest, regression, or test coverage Configuration Repository, CMake, YAML, JSON, or tool configuration Build Build system, CMake, compiler, or packaging labels Jun 14, 2026
@github-actions github-actions Bot added the pending CI checks still running label Jun 14, 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-14 19:00:59 UTC

@github-actions github-actions Bot added passed All CI checks passed Merge Ready Approved, mergeable, and all CI checks passed and removed pending CI checks still running labels Jun 14, 2026
@xsscx xsscx added this to the v2.3.2.2 milestone Jun 14, 2026
@github-actions github-actions Bot added Merge Ready Approved, mergeable, and all CI checks passed and removed Merge Ready Approved, mergeable, and all CI checks passed labels Jun 14, 2026
colourbill-ctrl and others added 2 commits June 14, 2026 13:53
…1308/#1348)

The CI tool-test job and ICCDEV_TEST_ENV both export
ASAN_OPTIONS=...detect_leaks=0 to silence unrelated leaks in the smoke-tested
tools.  This LSan-based leak regression inherited that and therefore PASSED
even on pre-fix master where the profile leaks 608 bytes -- a false green that
defeats the test's purpose.

Launch the test through `cmake -E env ASAN_OPTIONS=detect_leaks=1` (the same
override mechanism the script tests use) so leak detection is forced back on
for this test's own process.  Set ONLY detect_leaks=1: appending
halt_on_error=0 makes the runtime print the leak but exit 0 (ctest would still
pass), and a ':' option separator is mis-parsed and silently disables the
check -- both verified.

Verified on a clean build: under the CI env (detect_leaks=0 exported) the test
now FAILS with the 608-byte leak on pre-fix master and PASSES with the #1347
fix applied.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added pending CI checks still running and removed Merge Ready Approved, mergeable, and all CI checks passed passed All CI checks passed labels Jun 14, 2026
@github-actions github-actions Bot added failed One or more CI checks failed pending CI checks still running passed All CI checks passed and removed pending CI checks still running failed One or more CI checks failed labels Jun 14, 2026
@github-actions github-actions Bot added Merge Ready Approved, mergeable, and all CI checks passed and removed pending CI checks still running labels Jun 14, 2026
@xsscx xsscx merged commit a5fcb81 into master Jun 14, 2026
56 of 57 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 Merge Ready Approved, mergeable, and all CI checks passed passed All CI checks passed Testing CTest, regression, or test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Leak: sibling CIccXform::Create / CIccXformMpe::Create overloads leak pProfile on failure paths (follow-up to #1304)

2 participants