Repository navigation
fix: preserve strict DSP finite-value validation - #17
Merged
Elodie Mirza (elodiejmirza) merged 1 commit intoNov 4, 2026
Merged
Conversation
Signed-off-by: Elodie Mirza <elodiejmirza@gmail.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues for the changes protecting DSP finite-value validation from unsafe floating-point assumptions.
No open issues 🎉
What changed in this PR
This PR preserves the DSP finite-value validation introduced in #16 by preventing fast-math assumptions from disabling NaN and infinity checks.
Changes:
- Applies compiler-specific strict floating-point flags to DSP sources in both CMake directory scopes, including optional consumers.
- Adds compile-time guards to
dsp.cand its focused test to reject unsafe floating-point modes. - Retains CMake 3.10 compatibility and existing optimization flags for unrelated sources.
| File | Description |
|---|---|
test/dsp_bandpass_test.c |
Rejects compilation with fast-math or finite-only assumptions. |
test/CMakeLists.txt |
Applies strict floating-point flags to DSP and focused test sources. |
src/dsp.c |
Guards finite-value validation against unsafe compiler modes. |
src/CMakeLists.txt |
Applies strict floating-point flags to DSP source consumers. |
Review effort: Balanced
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.
BLUF
-ffast-mathcan invalidate the new finite-value checks and their test assertions. Earlier green tests/scanner fixed-at remain historical observations, not complete compiler-semantics assurance.-fno-fast-math -fno-finite-math-only(GNU/Clang) or/fp:strict(MSVC), selected by C compiler ID, in both source directory scopes. This covers every existing DSP consumer, including optional targets. Unrelated translation units keep existing optimization flags.dsp.cand its focused test. Preserve CMake3.10 syntax, platforms, numerical validation and the existing modem contract.9cc6f5f; merged after exact-head native/CodeQL/review gates passed. Final integrated proof below; Feature Request: control beacon transmission using an external command wb2osz/direwolf#179 remains open.Verification
-ffast-mathand independently-ffinite-math-only, in both protected sources. A defined MSVC fast-mode macro is also rejected. A positive-O3 -DNDEBUGprobe with unsafe flags followed by strict overrides passes.-Ofast -ffinite-math-only, inspected all7 relevant compile commands and executed them successfully:6 DSP consumers (direwolf/gen_packets/atest/dsp_bandpass_test/testagc/walk96) plus the focused test source. Strict flags follow unsafe options; the unrelated AFSK translation unit retains global fast math.direwolf.hexplicitly undefines NDEBUG before assert.h, so existing assertions remain active in Release; no unverified assertion-policy change.Security Review Evidence
Lessons Learned
Current Direwolf verification — 4 November 2026
26cd008fd0f8d02aee065180b5a6f8576c970522, normal merge of #17, containing signed/DCO9cc6f5f709bea2eefc96d6406e1240026f9e1cde. GitHub signatures/ancestry and clean synced task master read back. fix: restrict new WAV and received-frame file permissions #15/fix: reject unusable bandpass filter construction #16 source history is preserved.