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

ICU-22549 Add fuzzer for NumberFormatter #2706

Merged

Conversation

FrankYFTang
Copy link
Contributor

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22549
  • Required: The PR title must be prefixed with a JIRA Issue number.
  • Required: The PR description must include the link to the Jira Issue, for example by completing the URL in the first checklist item
  • Required: Each commit message must be prefixed with a JIRA Issue number.
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/test/fuzzer/Makefile.in is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

richgillam
richgillam previously approved these changes Nov 30, 2023
Copy link
Contributor

@richgillam richgillam left a comment

Choose a reason for hiding this comment

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

This looks okay to me, I think, but I'd like @sffc or somebody else more familiar with NumberFormatter to weigh in on whether there are additional APIs on this class you should be fuzzing.

Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Suggestion: take 4 bytes of the input and make them into a floating point number to be formatted. Parsing the skeleton is good, but we can also cover data loading. However, doing so will make the fuzzer a bit slower.

@jira-pull-request-webhook
Copy link

Notice: the branch changed across the force-push!

  • icu4c/source/test/fuzzer/Makefile.in is different
  • icu4c/source/test/fuzzer/number_formatter_fuzzer.cpp is different

View Diff Across Force-Push

~ Your Friendly Jira-GitHub PR Checker Bot

@FrankYFTang
Copy link
Contributor Author

Suggestion: take 4 bytes of the input and make them into a floating point number to be formatted. Parsing the skeleton is good, but we can also cover data loading. However, doing so will make the fuzzer a bit slower.

I implemented it now. PTAL

Copy link
Contributor

@richgillam richgillam left a comment

Choose a reason for hiding this comment

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

I like it. Hopefully Shane does too.

@FrankYFTang FrankYFTang merged commit e8e1945 into unicode-org:main Dec 1, 2023
97 checks passed
@FrankYFTang FrankYFTang deleted the ICU-22549-numberFormatter branch December 1, 2023 23:04
Copy link
Member

@sffc sffc left a comment

Choose a reason for hiding this comment

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

Looks right; it's possible I missed something in all the pointer math

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.

3 participants