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

Fuzzing #127

Merged
merged 1 commit into from
Sep 11, 2023
Merged

Fuzzing #127

merged 1 commit into from
Sep 11, 2023

Conversation

sharkdp
Copy link
Owner

@sharkdp sharkdp commented Jul 24, 2023

This is just a reminder how to do fuzzing with the Numbat parser. Not supposed to be merged (right now).

Dump save of the corpus found so far: corpus.zip

I was running the fuzzer using

cargo +nightly fuzz run interpreter -- -max_len=400

The max length is to avoid stack overflows for inputs like ((((((((((((((((((((((. This should also be fixed at some point.

Noteable bugs found using fuzzing:

  • dimension X = Length^(6/(5/(99999999999999999999999999999999999999))), overflow in exponent division, fix in a10832c
  • 0**0⁻⁸ (triggers a panic in an .unwrap(). This had a TODO attached but it wasn't clear to me if this could be triggered), fix in eb47136
  • Do not allow identifiers/units named _ or ans #130
  • -true (missing type check for unary operators)

numbat/src/parser.rs Outdated Show resolved Hide resolved
@sharkdp sharkdp changed the title Fuzzing [do not merge] Fuzzing Sep 11, 2023
@sharkdp sharkdp merged commit a3b9f75 into master Sep 11, 2023
1 check passed
@sharkdp sharkdp deleted the fuzzing branch September 11, 2023 21:32
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.

1 participant