Skip to content

Conversation

@evanrelf
Copy link
Contributor

@evanrelf evanrelf commented Mar 9, 2025

For example, the instance for NonZeroUsize was generating code equivalent to this:

NonZeroUsize::new(u.arbitrary::<usize>()?)?

But u.arbitrary::<usize>() can generate 0, which will fail.

For example, the instance for `NonZeroUsize` was generating code
equivalent to this:

```rust
NonZeroUsize::new(u.arbitrary::<usize>()?)?
```

But `u.arbitrary::<usize>()` can generate 0, which will fail.
@evanrelf
Copy link
Contributor Author

@fitzgen Anything else I should change, or is this ready for merge?

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Sorry for the delay, been traveling

@fitzgen fitzgen merged commit 69ac259 into rust-fuzz:main Nov 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants