fix: resolve _GLIBCXX_DEBUG assertion failures in nightly debug build#22039
Merged
fix: resolve _GLIBCXX_DEBUG assertion failures in nightly debug build#22039
Conversation
1e5b898 to
9a51c38
Compare
9a51c38 to
59724bd
Compare
59724bd to
4d6c18f
Compare
eea7212 to
ef96bf3
Compare
ef96bf3 to
5e114b0
Compare
5e114b0 to
64b64f8
Compare
64b64f8 to
0c65c9c
Compare
0c65c9c to
1a20758
Compare
1a20758 to
d27d98d
Compare
…g build
- batched_affine_addition.cpp: fix span::subspan OOB (passed count instead of remaining count)
- scalar_multiplication.hpp: avoid indexing empty vector when all MSM scalars are zero
- hmac.hpp: use secure_erase instead of `= {}` which empties vector for KeccakHasher
- gemini_impl.hpp: clamp multilinear_challenge access to span size in high-degree attack tests
- msm_builder.hpp: guard parallel_for_range when num_point_adds_and_doubles is 0
- poseidon2.test.cpp: fix off-by-one in hash padding collision test (hashes[3] on size-3 vector)
d27d98d to
3793476
Compare
ludamad
approved these changes
Apr 3, 2026
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
Three latent out-of-bounds bugs exposed by
_GLIBCXX_DEBUGbounds checking in the debug preset:subspan(offset, count)usedcount = 2*total_num_pairsbut onlytotal_num_pairselements are accessed — fixed count argument.&v[0]on empty vector when all MSM scalars are zero — changed tov.data() + offset.multilinear_challenge[l]accessed OOB when polynomial degree exceeds2^(challenge size)— added bounds check, falls back tou=0(even-part fold).Verification
ecc_tests(830),commitment_schemes_tests(88),ultra_honk_tests(263): all pass in both debug and release builds.Detailed analysis: https://gist.github.com/AztecBot/730124390e63fc60844a394f2d224fb7