Fuzzer Not Detecting Incorrect Allocation
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
Research direction
Start by running the tests in src/fastalloc/tests.rs at the referenced commit and inspect how branch instruction operands are represented and checked. Compare the two provided examples, then determine whether branch operands should be disallowed or included in fuzzer validation. Done means the incorrect allocation case is rejected or the unsupported operands are prevented.
Written by the indexing model from the issue text.
Description
It's possible for vregs to be used or defined in branch instructions, but the fuzzer doesn't seem to check for these operands.
The following doesn't pass the fuzzer:
block0:
0. branch(1). operands: [def v0 (fixed: p0)] // Allocation: [v0: p0]
block1:
1. operands: [use v0 (fixed: p0)] // Allocation: [v0: p0]
And this does:
block0:
0. operand: [def v0 (fixed: p0)] // Allocation: [v0: p0]
1. branch(1). operands: [use v0 (fixed: p1)] // Allocation: [v0: p9]
block1:
2. operands: [use v0 (fixed: p0)] // Allocation: [v0: p0]
Which is incorrect.
To reproduce this, run the tests in src/fastalloc/tests.rs at https://github.com/d-sonuga/regalloc2/tree/975dee0ceb56bbc6cbd21554a237babe1e388573.
To resolve this issue, one of the following could be done:
- Disallow operands in branch instructions.
- Update the fuzzer to check for these operands.
- 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 4/5 3-5 days Newbie friendliness 48/100
bytecodealliance/regalloc2#265 · 7 comments ·
-
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 ·
All issues in bytecodealliance/regalloc2
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
ontola/atomic-server#1625 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
VirusTotal/yara-x#777 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
stratum-mining/stratum#2404 ·
-
bug ci good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100