Conversation
xsscx
approved these changes
Mar 15, 2026
Member
xsscx
left a comment
There was a problem hiding this comment.
Maintainer Review
2026-03-15 01:58:45 UTC
Repro
mkdir pr-691
cd pr-691
git clone https://github.com/InternationalColorConsortium/iccDEV.git
cd iccDEV/Build
git fetch origin pull/691/head:pr-691
git checkout pr-691
export CXX=clang++ && export CXXFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer -g -O1 -fprofile-arcs -ftest-coverage" && export LDFLAGS="-fsanitize=address,undefined -fprofile-arcs" && cmake Cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DENABLE_UBSAN=ON -DENABLE_COVERAGE=ON
make -j$(nproc)
cd ../Testing/
echo "=== Updating PATH ==="
for d in ../Build/Tools/*; do
[ -d "$d" ] && export PATH="$(realpath "$d"):$PATH"
done
cd ..
wget https://github.com/xsscx/fuzz/raw/refs/heads/master/graphics/icc/npd-CIccCombinedConnectionConditions-IccPcc_cpp-Line337.icc
printf "'RGB '\t; Data Format\nicEncodeFloat\t; Encoding\n\n0.5 0.5 0.5\n" > pcc-test-data.txt
iccApplyNamedCmm pcc-test-data.txt 0 0 Testing/Display/Rec2020rgbSpectral.icc 0 -PCC npd-CIccCombinedConnectionConditions-IccPcc_cpp-Line337.icc
PR Application Output
[2026-03-15 01:58:04 UTC] ~/pr-691/iccDEV (pr-691)$ git log --oneline --graph -1
* f9a3449 (HEAD -> pr-691, origin/issue-676) check that the PCC has required data before dereferencing it
[2026-03-15 01:58:20 UTC] ~/pr-691/iccDEV (pr-691)$ file Testing/Display/Rec2020rgbSpectral.icc
Testing/Display/Rec2020rgbSpectral.icc: color profile 5.0, RGB/XYZ-mntr device, 24620 bytes, 11-3-2026 10:52:32, embedded, relative colorimetric, PCS X=0xf34f Z=0x116a5, 0x304896b5c015520 MD5 'Rec. 2020 RGB Spectral'
[2026-03-15 01:58:23 UTC] ~/pr-691/iccDEV (pr-691)$ file npd-CIccCombinedConnectionConditions-IccPcc_cpp-Line337.icc
npd-CIccCombinedConnectionConditions-IccPcc_cpp-Line337.icc: color profile 5.0, RGB/XYZ-mntr device, 832 bytes, 13-3-2026 15:03:44, embedded, PCS X=0xf34d Z=0x116c2, 0xf0cb0b1fe858bb33 MD5 'CFL-019 PoC - No svcn'
[2026-03-15 01:58:26 UTC] ~/pr-691/iccDEV (pr-691)$ iccApplyNamedCmm pcc-test-data.txt 0 0 Testing/Display/Rec2020rgbSpectral.icc 0 -PCC npd-CIccCombinedConnectionConditions-IccPcc_cpp-Line337.icc
Error 3 - Unable to begin profile application - Possibly invalid or incompatible profiles
=================================================================
==26636==ERROR: LeakSanitizer: detected memory leaks
Indirect leak of 208 byte(s) in 1 object(s) allocated from:
#0 0x629076db2e71 in operator new(unsigned long) (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x15be71) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
#1 0x7bb28a8ef602 in OpenIccProfile(char const*, bool) /home/h02332/pr-691/iccDEV/IccProfLib/IccProfile.cpp:3559:23
#2 0x629076db6e4b in main /home/h02332/pr-691/iccDEV/Tools/CmdLine/IccApplyNamedCmm/iccApplyNamedCmm.cpp:362:21
#3 0x7bb289a2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#4 0x7bb289a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#5 0x629076cd9a04 in _start (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x82a04) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
Indirect leak of 200 byte(s) in 5 object(s) allocated from:
#0 0x629076db2e71 in operator new(unsigned long) (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x15be71) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
#1 0x7bb28a8f5858 in std::__new_allocator<std::_List_node<IccTagEntry>>::allocate(unsigned long, void const*) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/new_allocator.h:151:27
#2 0x7bb28a8f5858 in std::allocator_traits<std::allocator<std::_List_node<IccTagEntry>>>::allocate(std::allocator<std::_List_node<IccTagEntry>>&, unsigned long) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/alloc_traits.h:482:20
#3 0x7bb28a8f5858 in std::__cxx11::_List_base<IccTagEntry, std::allocator<IccTagEntry>>::_M_get_node() /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_list.h:518:16
#4 0x7bb28a8f5858 in std::_List_node<IccTagEntry>* std::__cxx11::list<IccTagEntry, std::allocator<IccTagEntry>>::_M_create_node<IccTagEntry const&>(IccTagEntry const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_list.h:710:21
#5 0x7bb28a8f5782 in void std::__cxx11::list<IccTagEntry, std::allocator<IccTagEntry>>::_M_insert<IccTagEntry const&>(std::_List_iterator<IccTagEntry>, IccTagEntry const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/bits/stl_list.h:2005:18
#6 0x7bb28a8c8494 in CIccProfile::ReadBasic(CIccIO*) /home/h02332/pr-691/iccDEV/IccProfLib/IccProfile.cpp:1270:12
#7 0x7bb28a8c6016 in CIccProfile::Attach(CIccIO*, bool) /home/h02332/pr-691/iccDEV/IccProfLib/IccProfile.cpp:695:8
#8 0x7bb28a8ef67d in OpenIccProfile(char const*, bool) /home/h02332/pr-691/iccDEV/IccProfLib/IccProfile.cpp:3561:14
#9 0x629076db6e4b in main /home/h02332/pr-691/iccDEV/Tools/CmdLine/IccApplyNamedCmm/iccApplyNamedCmm.cpp:362:21
#10 0x7bb289a2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#11 0x7bb289a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#12 0x629076cd9a04 in _start (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x82a04) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x629076db2e71 in operator new(unsigned long) (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x15be71) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
#1 0x7bb28a8ef56c in OpenIccProfile(char const*, bool) /home/h02332/pr-691/iccDEV/IccProfLib/IccProfile.cpp:3552:25
#2 0x629076db6e4b in main /home/h02332/pr-691/iccDEV/Tools/CmdLine/IccApplyNamedCmm/iccApplyNamedCmm.cpp:362:21
#3 0x7bb289a2a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#4 0x7bb289a2a28a in __libc_start_main csu/../csu/libc-start.c:360:3
#5 0x629076cd9a04 in _start (/home/h02332/pr-691/iccDEV/Build/Tools/IccApplyNamedCmm/iccApplyNamedCmm+0x82a04) (BuildId: f3d1ab79afbddeb2140f16551f3b28b62da5b468)
SUMMARY: AddressSanitizer: 424 byte(s) leaked in 7 allocation(s).
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.
FIxes #676
Pull Request Checklist