Files
Patrice Blin be910da926 fix: prevent out-of-bounds access in SplitBasicBlock::split
When a basic block has exactly as many instructions as splitN (e.g. 2
instructions with default splitN=2), the bound check `splitN > curr->size()`
was false so splitN was not capped. The `test` vector only has `curr->size()-1`
entries, causing an out-of-bounds access on `test[i]` and a crash.

Change `>` to `>=` so splitN is correctly capped to `curr->size()-1`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-09 14:37:30 +01:00
..