Skip to content

[codex] Fix parse_double huge exponent handling#3464

Closed
bobzhang wants to merge 1 commit into
mainfrom
codex/fix-parse-double-huge-exponent
Closed

[codex] Fix parse_double huge exponent handling#3464
bobzhang wants to merge 1 commit into
mainfrom
codex/fix-parse-double-huge-exponent

Conversation

@bobzhang
Copy link
Copy Markdown
Contributor

Summary

Fix parse_double slow-path handling for decimal strings with extremely large exponent fields.

The decimal fallback previously accumulated the exponent in an Int without a cap. Inputs such as 1e999999999999999999999999999999999999 could overflow that accumulator and produce a small finite value instead of reporting range overflow. The fix clamps exponent accumulation once the value is already beyond the slow path's overflow or underflow thresholds.

Validation

  • moon fmt internal/strconv
  • moon info internal/strconv
  • moon test internal/strconv
  • moon check
  • moon test

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 3923

Coverage decreased (-0.01%) to 94.879%

Details

  • Coverage decreased (-0.01%) from the base build.
  • Patch coverage: 2 uncovered changes across 1 file (7 of 9 lines covered, 77.78%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
internal/strconv/strconv_decimal.mbt 9 7 77.78%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 15582
Covered Lines: 14784
Line Coverage: 94.88%
Coverage Strength: 220208.71 hits per line

💛 - Coveralls

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.

2 participants