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 Issue 22637 - std.conv to!double and parse!double dont throw on under/overflow #8502

Merged
merged 1 commit into from
Jul 12, 2022

Conversation

GrimMaple
Copy link
Contributor

This happened because parse enforced on real.
And provided number actually fits real.
Changed to enforce on Target type instead

@GrimMaple GrimMaple requested a review from JackStouffer as a code owner July 8, 2022 18:27
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @GrimMaple! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
22637 normal std.conv `to!double` and `parse!double` dont throw on under/overflow

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8502"

std/conv.d Outdated Show resolved Hide resolved
@schveiguy
Copy link
Member

technically, this should target stable. But it's probably not a huge issue that needs to get in next release.

std/conv.d Outdated Show resolved Hide resolved
@ibuclaw
Copy link
Member

ibuclaw commented Jul 9, 2022

technically, this should target stable. But it's probably not a huge issue that needs to get in next release.

Err, you've got hours before the next point release is tagged, otherwise you're going to have to wait a couple months for the next release.

…on under/overflow

This happened because `parse` enforced on real.
And provided number actually fits real.
Changed to enforce on `Target` type instead
@schveiguy
Copy link
Member

Don't worry about putting it in stable. Even though it's a bug fix, it doesn't affect currently-compiling code.

@schveiguy
Copy link
Member

@kinke any objection? I'll tag with the 72 hour merge. Feel free to merge early.

@schveiguy schveiguy added the Merge:72h no objection -> merge The PR will be merged if there are no objections raised. label Jul 9, 2022
@RazvanN7 RazvanN7 merged commit 494b318 into dlang:master Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Merge:72h no objection -> merge The PR will be merged if there are no objections raised. Severity:Bug Fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants