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

Adding fuzz test for date parser #1262

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jesslatimer
Copy link

@jesslatimer jesslatimer commented Feb 13, 2023

Summary of changes

Adds a fuzz test to the date parser using google/atheris.

Pull Request Checklist

  • Changes have tests
  • Authors have been added to AUTHORS.md
  • News fragment added in changelog.d. See CONTRIBUTING.md for details

fdp = atheris.FuzzedDataProvider(data)
try:
parse(fdp.ConsumeString(len(data)))
except (ParserError, OverflowError, InvalidOperation):
Copy link
Author

Choose a reason for hiding this comment

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

I wasn't sure if I should include InvalidOperation in the catch list. Without it the fuzzer crashes very quickly due to #1199.

@jesslatimer jesslatimer marked this pull request as ready for review February 13, 2023 23:39
@jesslatimer
Copy link
Author

I'm not sure I understand how I've introduced some CI failures. Do you mind helping me interpret the problem?

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.

None yet

1 participant