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

Fix uninitialized values when parsing zeroes #242

Merged
merged 5 commits into from
Jan 2, 2025

Conversation

Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Dec 28, 2024

00[..].e0 will not initialize the significant reference argument.

00[..]0.[0...] will not initialize exponent nor significant.

Requires

@Flamefire Flamefire marked this pull request as ready for review December 28, 2024 12:50
Copy link

codecov bot commented Dec 28, 2024

Codecov Report

Attention: Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.85%. Comparing base (9846df1) to head (685d4b1).
Report is 6 commits behind head on develop.

Files with missing lines Patch % Lines
include/boost/charconv/detail/parser.hpp 90.90% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #242      +/-   ##
===========================================
+ Coverage    94.77%   94.85%   +0.08%     
===========================================
  Files           69       69              
  Lines         9050     9085      +35     
===========================================
+ Hits          8577     8618      +41     
+ Misses         473      467       -6     
Files with missing lines Coverage Δ
test/test_parser.cpp 100.00% <100.00%> (ø)
include/boost/charconv/detail/parser.hpp 83.66% <90.90%> (+3.97%) ⬆️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9846df1...685d4b1. Read the comment docs.

`0.e0` will not initialize the significant reference argument.
`00[..]0.[0...]` will not initialize exponent nor significant.
@Flamefire
Copy link
Contributor Author

BTW: During the rebase I figured it would be easier to (re)use val and r instead of numbering them. This also eliminates the potential for a C&P error especially in valX, strlen(valX) param pair. And/Or parser could accept a string_view.

@mborland
Copy link
Member

mborland commented Jan 2, 2025

Other than that one comment to make windows platforms happy this looks good to me.

Co-authored-by: Matt Borland <[email protected]>
@Flamefire
Copy link
Contributor Author

Other than that one comment to make windows platforms happy this looks good to me.

Fixed. A quick regex search shows a few similar issues, e.g. in fallback_routines.hpp

@mborland mborland mentioned this pull request Jan 2, 2025
@mborland
Copy link
Member

mborland commented Jan 2, 2025

Other than that one comment to make windows platforms happy this looks good to me.

Fixed. A quick regex search shows a few similar issues, e.g. in fallback_routines.hpp

Opened #251

@mborland mborland merged commit ffd3e71 into boostorg:develop Jan 2, 2025
70 checks passed
@Flamefire Flamefire deleted the zeroes branch January 3, 2025 08:40
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