Commit fc319eb
committed
fix: clamp logderivative inverse range to fix nightly debug build OOB
In compute_logderivative_inverse(), the multithreaded path partitions
work by circuit_size but inverse_polynomial.coeffs() can be smaller
than circuit_size (virtual zero elements). When a thread chunk's start
exceeds the polynomial's actual data size, coeffs()[start] is out of
bounds -- caught by _GLIBCXX_DEBUG's span bounds checking in the debug
build.
Fix: clamp start/end to the polynomial's actual data range before
calling batch_invert. Virtual zero elements need no inversion.1 parent 9a72466 commit fc319eb
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