Commit d154e7b
committed
fix: clamp logderivative inverse range to prevent OOB in debug builds
In compute_logderivative_inverse(), the multi-threaded path splits work
by circuit_size, but inverse_polynomial.coeffs() only covers actual
(non-virtual) data. When a thread chunk's start exceeds the polynomial's
actual size, coeffs()[start] is out of bounds -- caught by _GLIBCXX_DEBUG
span bounds checking in the debug build preset.
Clamp start/end to the polynomial's actual data range before batch_invert.
Virtual zero elements need no inversion.
Same fix as PR #22312 (merged to merge-train/barretenberg but not yet on next).1 parent cf1a239 commit d154e7b
File tree
1 file changed
+11
-5
lines changed- barretenberg/cpp/src/barretenberg/honk/proof_system
1 file changed
+11
-5
lines changedLines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
67 | 73 | | |
68 | 74 | | |
69 | 75 | | |
| |||
0 commit comments