Repository navigation
fix(test): zero-initialise the SAD tables of the motion-window stream tests - #2671
Merged
Merged
Conversation
8 of 14 tasks
…tal instance (#2660) * feat(metal): evaluate two ADM viewing distances in one integer_adm_metal instance integer_adm_metal takes adm_norm_view_dist_extra and the shared merge callback and name hook (adm_view_dist.c). iadm_metal_view_stages() gives each distance its stage plan: the first runs every stage of iadm_metal_stages(), a later one only the stages after the DWT, which read the bands the first distance's DWT left. submit encodes each scale's distances in turn, each with its own options, uniforms and reduction buffers (accum, accum_x); collect concludes each distance with iadm_metal_scores() and files the second under the <base>:nvde keys, without debug scores (ADR-2795). No Apple device runs anything for the project. The host replay holds both distances to the CPU with == (test_two_viewing_distances: 8 and 10 bits, model options); the Metal parity test gains test_adm_two_views_exact and test_adm_merged_registrations_exact for the device and runs them as a CPU self-test on every host. The device run is carried as T-METAL-ADM-SECOND-VIEW-DIST-DEVICE-2026-10-09, mapped to those two cases in the macOS tester bundle's metal-rows.json. * docs: regenerate the indexes and the citation map after rebasing Signed-off-by: Lusoris <lusoris@proton.me>
… tests (#2671) * fix(test): zero-initialise the SAD tables of the motion-window stream tests The Cppcheck job fails on master since #2290: cppcheck 2.19.0 reports uninitvar on sad in test_motion_window_incremental.c at lines 256 and 289. The loops write every entry the check reads (the arrival order is a permutation of 0..n-1 for every stream length used) and stop early only on an error, after which nothing is read: a false positive that cppcheck cannot see through the permuted index. Both tables are zero-initialised, so they are whole on every path. No suppression; both findings are gone with the CI flags. The state row is T-CPPCHECK-MOTION-WINDOW-SAD-UNINITVAR-2026-10-09. Signed-off-by: Lusoris <lusoris@proton.me>
lusoris
force-pushed
the
fix/cppcheck-motion-window-sad-uninitvar
branch
from
October 9, 2026 14:57
3b0ed45 to
eefcd6f
Compare
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
The
Cppcheckjob of the Lint workflow fails on master since #2290 (e584c79a6). cppcheck 2.19.0, the Ubuntu 26.04 package CI installs, reportsuninitvaronsadincore/test/test_motion_window_incremental.cat lines 256 and 289.Verdict: false positive. Both loops write every entry that
mwi_values_match()reads:mwi_stream()the writes go through the permuted indexmwi_arrival(k, n, shuffled). That order is a permutation of0..n-1for every stream length the test uses (0, 1, 2, 3, 4, 5, 9 and 17; checked).test_flush_without_state_equals_upstream_flush()the writes are in order.Each loop stops early only on an error, and the read is guarded by
!err. cppcheck cannot see coverage through the permuted index.Fix: both tables are zero-initialised before their loops, so they are whole on every path. A comment names the permutation. There is no suppression.
#2645 carries the same change from before #2290 landed. It has been blocked on a conflict in this file since 00:34. I have not closed it or marked it superseded; that is for its owner to decide.
Type
fix— bug fixtest— test-onlyChecklist
git commit -s; fix a branch withgit rebase --signoff origin/master). See DCO sign-off.clang-format --dry-run --Werroris clean. cppcheck 2.19.0 with the CI flags is clean on the file.test_motion_window_incremental(5 tests) andtest_motion_window_advance_contract.Bug-status hygiene (ADR-0165)
docs/state.mdupdated in this PR with a row in Recently closed (T-CPPCHECK-MOTION-WINDOW-SAD-UNINITVAR-2026-10-09).Netflix golden-data gate (ADR-0024)
assertAlmostEqual(...)score in the Netflix golden Python tests.Deep-dive deliverables (ADR-0108)
AGENTS.mdinvariant note — no rebase-sensitive invariants: test-only change.Reproducer
Known follow-ups
None.