rust-fuzz / rust-fuzz/arbitrary
Allow getting an arbitrary length with a maximum upper bound
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 880
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
Sometimes you don't want more than N things generated because, for example, it makes the fuzz target too slow and run up against libfuzzer timeouts.
A solution to this is pretty similar to a solution to #35 in that they both want access to (or something closer to) the underlying int_in_range from the end of the byte string.
impl Unstructured<'_> {
pub fn arbitrary_len_with_max<ElementType>(&mut self, max: usize) -> Result<usize>
where
ElementType: Arbitrary,
{
...
}
}
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 by reading the Unstructured API and the underlying int_in_range logic referenced in the issue, then compare the proposed approach with issue #35. Done means exposing an arbitrary-length operation that accepts a maximum and returns a length no greater than that bound, with behavior covered by the relevant existing tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 40/100