unsafe `set_len` breaks fragmentation rules
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3
- Forks
- 5
- Avg merge
- 1h 40m
- Merged PRs (30d)
- 11
Description
Assume we are using a Doubling strategy and currently we have 2 fragments with capacities of 4 an 8 respectively.
If the user calls set_len(3) while the vector is on this state, we will have:
- fragment 1 with len=3 and capacity=4
- fragment 2 with len=0 and capacity=8
This is an invalid fragment state. We must drop the second fragment.
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.
Research direction
Start at the set_len implementation and reproduce the Doubling strategy state described in the issue, with fragments of capacities 4 and 8. Done means calling set_len(3) leaves the first fragment at length 3 and removes the now-empty second fragment; add or run the relevant set_len tests if present.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- data
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 58/100