Test: regression for CIccXform::Create tag-overload profile ownership (#1308)#1348
Merged
Conversation
…#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>
…nership-regression
…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>
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.
Summary
Deterministic CTest regression for #1308 — the tag-based
CIccXform::Createoverload leaking the profile it was given on failure. Pairs with fix PR #1347.iccdev.xform-create-tag-ownershiphands a valid profile plus a NULL transform tag toCIccCmm::AddXform(CIccProfile*, CIccTag*). The NULL tag forces the tag-basedCreateonto its failure path, which must free the owned profile. The profile is opened and passed inside a helper, so a profileCreatefails to free is unreachable and reported by the at-exit LeakSanitizer scan (the iccDEV ASan CI job). A status check confirms the intendedCreate-failure path (BadXform) was exercised.What's added
.github/ci/regression/xform-create-tag-ownership.cpp(C++ helper linkingIccProfLib)iccdev.xform-create-tag-ownership(labelissue-1308), using the trackedTesting/sRGB_v4_ICC_preference.iccVerification
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