Commit 5f080e9
authored
fix: clamp logderivative inverse range to fix nightly debug build OOB (#22312)
## Summary
Fixes nightly barretenberg debug build which crashes with SIGABRT (exit
code 134) in test
`AvmRecursiveTests.TwoLayerAvmRecursionFailsWithWrongPIs`.
**Root cause:** In `compute_logderivative_inverse()`, the multi-threaded
path splits work by `circuit_size`, but `inverse_polynomial.coeffs()`
only covers the 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`'s span bounds checking in the debug build
preset.
**Fix:** Clamp `start`/`end` to the polynomial's actual data range
before `batch_invert`. Virtual zero elements need no inversion.
Note: The `batch_invert` reserve→resize fix from the original PR #22312
is no longer needed as it was already applied on `next`. PR #22314 can
be closed as duplicate.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