Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic if the max_repeat is lower than the minimum repetition in a pattern #9

Open
fuchsnj opened this issue Oct 11, 2023 · 0 comments

Comments

@fuchsnj
Copy link

fuchsnj commented Oct 11, 2023

If you create a Generator with a lower max_repeat than the pattern requires, the generator will not error, but you will get a panic when actually generating input.

Example input pattern: x{150,} (repeat x at least 150 times).

panic:

thread <redacted> panicked at 'Uniform::new_inclusive called with `low > high`',<redacted>/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rand-0.8.5/src/distributions/uniform.rs:567:1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

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

No branches or pull requests

1 participant