Security context

What an agent needs to avoid regressing past fixes and find the next vuln in this repo.

bytecodealliance/regalloc2
main @ aa9680b
3
Fixes
0
CVEs
HIGH
Peak severity
100.0%
Coverage
Highlights
Denial of Service: 3 prior fixes. Scrutinize any change in this area.
src/fastalloc/mod.rs: most-fixed (1 issue). Treat as high-risk during review.
1 high-severity fix in this history; regressions here are high-impact.
Recurring patterns

The bug types that recur here, drawn from past fixes, not open vulnerabilities.

Denial of Service: Incorrect constraint checks and allocation ordering between early and late phases in the fastalloc register allocator can trigger compiler panics/crashes when processing valid input blocks under complex register constraints. Developers should ensure allocation invariants are strictly checked without causing abrupt panics.
Denial of Service: Integer overflows can occur when instructions exceed 255 operands, leading to silent wraparound and memory safety panic violations. Safe conversions (e.g., TryFrom checks) and wider slot index types must be consistently used for operand indexing.
Denial of Service: Out-of-bounds indexing in SSA validation and postorder CFG traversal occurs when processing blocks or virtual registers with non-consecutive IDs. Validation code must gracefully return errors instead of relying on indexing operations that can panic under invalid block layouts.