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-22798 Avoid stack overflow by return error. #3035

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Jun 12, 2024

Change the nested level limit from 0x7fff to 0x0fff since the fuzzer found in some machine 6400 level deep already cause stack overflow.

Checklist
  • Required: Issue filed: https://unicode-org.atlassian.net/browse/ICU-22798
  • 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

richgillam
richgillam previously approved these changes Jun 12, 2024
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.

LGTM

@FrankYFTang
Copy link
Contributor Author

MSVC build all fail on the new test I add. Maybe the stack is even shallower, trying to reduce the limit to see would that make it pass

@FrankYFTang
Copy link
Contributor Author

so I test to use different limit on MSVC in another testing PR
it turn out limit to 0x0fff (4095) or 0x07ff 2047 still cause very deep stack for MSVC and crash, but limit to 0x1ff (511) work. Trying the limit of 0x3ff (2047) on another PR now.

@FrankYFTang FrankYFTang force-pushed the ICU-22798-nestedChoice branch from 268a85a to f4e9ccd Compare June 13, 2024 22:45
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@FrankYFTang
Copy link
Contributor Author

PTAL

@rp9-next rp9-next merged commit 697cb14 into unicode-org:main Jun 14, 2024
97 checks passed
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.

Belated ship-it. The additional drop in the level is fine with me.

@FrankYFTang FrankYFTang deleted the ICU-22798-nestedChoice branch June 17, 2024 19:10
echeran pushed a commit to echeran/icu that referenced this pull request Jun 28, 2024
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