Commit d27d98d
committed
fix: resolve _GLIBCXX_DEBUG assertion failures in debug build
Three latent bugs exposed by _GLIBCXX_DEBUG bounds checking:
1. batched_affine_addition.cpp: subspan(total_num_pairs, 2*total_num_pairs)
requested 2*total_num_pairs elements but only total_num_pairs are used.
Fixed count argument to total_num_pairs.
2. scalar_multiplication.hpp: MSMData::from_work_unit accessed empty vector
via &v[0] when all scalars are zero. Changed to v.data() + offset.
3. gemini_impl.hpp: compute_fold_polynomials accessed multilinear_challenge
out of bounds when polynomial degree > 2^(challenge size). Added bounds
check to fall back to u=0 for rounds beyond the challenge array.1 parent 4598628 commit d27d98d
3 files changed
Lines changed: 6 additions & 5 deletions
File tree
- barretenberg/cpp/src/barretenberg
- commitment_schemes/gemini
- ecc
- batched_affine_addition
- scalar_multiplication
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
142 | 143 | | |
143 | 144 | | |
144 | 145 | | |
| |||
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
164 | | - | |
| 165 | + | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
0 commit comments