Repository navigation
Conversation
…g_ds_process The else branch for a masked channel uses iSampleBC without assigning it and has no iBin loop, unlike the branch above it. If no channel has been unmasked yet in this call the index is uninitialised, which is an arbitrary write. Otherwise it is left over from the last unmasked channel, so one valid weight is zeroed and the masked channel's own weights keep their previous values. Loop over the bins as the mask == 1 branch does. Co-Authored-By: Claude Opus 5.5 <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.
In
steer2demixing_ds_process, theelsebranch for a masked channel usesiSampleBCwithout assigning it, and has noiBinloop, unlike themask == 1branch above it.This is easy to miss on larger arrays. From the code, the index is only uninitialised if every channel is masked, which a ring of 4 rarely hits but a 2-capsule array can: AddressSanitizer reported an access violation at
steer2demixing.c:135, reached throughmod_sss_process_dds, and it killed 3 of 27 runs over recorded corpora. When some channel is unmasked, the index is left over from that channel, so one valid weight is zeroed and the masked channel keeps its previous weights, with no crash.The fix gives the
elsethe same loop as the branch above.Builds with no warnings on Ubuntu 22.04, gcc 11.4. Runtime-tested in my port of ODAS (Android/Windows, KissFFT in place of FFTW): a run that previously died at 256 s and 298 s now completes all 29,044 hops clean under ASan.
🤖 Generated with Claude Code