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

Test corner cases of parser #241

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

Flamefire
Copy link
Contributor

Inspecting the function I see some corner cases that could yield wrong values and/or overflow.

What I suspect:

  • There is an off-by-one error in the buffer size which causes early truncation of the significant
  • The exponent might overflow if it is too large. By using a type with at least 20bits this likely does not happen in practice, so I guess that should be enforced.
  • However for large strings the exponent might still overflow or even e.g. leading_zero_powers or extra_zeroes might already

I came up with some tests that should exercise the corner cases. Please check if they make sense so far before I go into more details

@Flamefire Flamefire changed the title Test range Test corner cases of parser Dec 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.

1 participant