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

Scanf "%F" or "%H" and float_of_string are broken for "nan" on Windows #7069

Closed
vicuna opened this issue Dec 1, 2015 · 4 comments
Closed

Comments

@vicuna
Copy link

vicuna commented Dec 1, 2015

Original bug ID: 7069
Reporter: @gasche
Status: acknowledged (set by @damiendoligez on 2016-02-03T15:14:50Z)
Resolution: open
Priority: normal
Severity: minor
Version: 4.03.0+dev / +beta1
Category: standard library
Related to: #4688
Monitored by: braibant @diml @dra27

Bug description

I had to disable my Printf->Scanf round-tripping test for %H on nan values on Windows, because it breaks on MSVC.
1bc5c74

In #4688 we decided to fix Printf / string_of_float's handling of nan and infinite values by the MSVC runtime. I think it would be good to extend this sanitization principle to Scanf / float_of_string, to give reliable guarantees on the behavior of %F and the new %H format across platforms.

@vicuna
Copy link
Author

vicuna commented Dec 10, 2015

Comment author: @dra27

Note that on mingw64, float_of_string works without any patching (but scanf "%F" does not) - this means it works on the old MSVCRT that mingw64 compiles against, but it's then been broken in more recent versions!

@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 11, 2020
@dra27 dra27 removed the Stale label May 11, 2020
@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 14, 2021
@dra27 dra27 removed the Stale label May 14, 2021
@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants