Skip to content

Handle leading zeros in scientific notation literals#1336

Merged
WardBrian merged 2 commits into
masterfrom
fix/ast-to-mir-mangling
Jul 17, 2023
Merged

Handle leading zeros in scientific notation literals#1336
WardBrian merged 2 commits into
masterfrom
fix/ast-to-mir-mangling

Conversation

@WardBrian
Copy link
Copy Markdown
Member

I'm performing some fuzzing for #1100 and it found this bug which exists independently of that PR. The AST to MIR translation currently avoids trimming a leading zero if the next character is e or ., but not E, leading to (in this case) failures in the partial evaluator at --O1.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here:
    • OR, no user-facing changes were made

Release notes

Fixed an issue with leading zeroes in real literals like 0E0

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

@WardBrian WardBrian added bug Something isn't working optimization labels Jul 17, 2023
@WardBrian WardBrian requested a review from rok-cesnovar July 17, 2023 13:55
Copy link
Copy Markdown
Member

@rok-cesnovar rok-cesnovar left a comment

Choose a reason for hiding this comment

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

👍🏻

@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 17, 2023

Codecov Report

Merging #1336 (20c3078) into master (464e4dc) will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master    #1336   +/-   ##
=======================================
  Coverage   88.77%   88.77%           
=======================================
  Files          64       64           
  Lines        9873     9873           
=======================================
  Hits         8765     8765           
  Misses       1108     1108           
Impacted Files Coverage Δ
src/frontend/Ast_to_Mir.ml 92.25% <0.00%> (ø)

@WardBrian WardBrian merged commit f13b604 into master Jul 17, 2023
@WardBrian WardBrian deleted the fix/ast-to-mir-mangling branch July 17, 2023 16:36
@WardBrian WardBrian mentioned this pull request Jul 18, 2023
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working optimization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants