Make regalloc2 panic-clean: always return errors when impossible constraints occur
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start by tracing the allocator's handling of impossible constraints, especially when two operands are required to share a PReg, and identify the panic!() or assert!() paths involved. Follow the allocator's public error-returning path so these cases become returned errors, then add coverage for the conflicting-PReg constraint and verify that allocation no longer panics.
Written by the indexing model from the issue text.
Description
Right now, the allocator can panic if the client provides impossible constraints, such as requiring two different operands to be placed in the same PReg.
While this represents a programming error in the client and shouldn't arise from an invalid input program, it is always better to bubble up errors; we should reserve panic!() and assert!() for conditions that can only be violated due to errors in regalloc2 itself.
- Dominant language
- Rust
- Stars
- 266
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from bytecodealliance/regalloc2
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bytecodealliance/regalloc2#247 · 3 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
bytecodealliance/regalloc2#222 · 4 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
bytecodealliance/regalloc2#206 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
bytecodealliance/regalloc2#194 · 7 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
bytecodealliance/regalloc2#191 · 3 comments ·
All issues in bytecodealliance/regalloc2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug team:backend track:services-maintenance
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
cowprotocol/services#4950 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·