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

Backport windows fixes with INFINITY/NAN #19389

Merged
merged 7 commits into from
Nov 25, 2024
Merged

Backport windows fixes with INFINITY/NAN #19389

merged 7 commits into from
Nov 25, 2024

Conversation

mkruskal-google
Copy link
Member

No description provided.

haberman and others added 3 commits November 25, 2024 11:15
Fixes: #17308, #17238

Confirmation that this addresses the issue: grpc/grpc#37210 (comment)

PiperOrigin-RevId: 652541857
In C23, `false` is now of type `bool`, not `int`. This turned a couple places where `false` was returned instead of `NULL` into errors.

The workaround in upb for Windows's broken NAN macro causes an error in Clang under C23, `cannot compile this static initializer yet`, I believe because `0.0 / 0.0` is not valid in constant-evaluation. This seems like it's probably a legitimate result of C23 standardizing constexpr, although it _could_ be a clang bug. In any case, refine the workaround a bit, to avoid this problem.

I've also reverted the kUpb_FltInfinity/kUpb_Infinity back to their former definitions, as INFINITY wasn't broken by the windows header, only NAN.

PiperOrigin-RevId: 683152452
We previously hit this for NAN, but it appears the latest version of MSVC used in windows github runners has the same issue for INFINITY.  The same strategy can be applied here.

This will be backported to fix broken release branches.

PiperOrigin-RevId: 699390594
@mkruskal-google mkruskal-google added back-port Cherrypick PRs to release branches upb labels Nov 25, 2024
@mkruskal-google mkruskal-google requested a review from a team as a code owner November 25, 2024 19:19
@mkruskal-google mkruskal-google requested a review from a team as a code owner November 25, 2024 19:32
@mkruskal-google mkruskal-google changed the title Fix windows issues with INFINITY/NAN Backport windows fixes with INFINITY/NAN Nov 25, 2024
@mkruskal-google mkruskal-google requested a review from a team as a code owner November 25, 2024 19:51
Python 3.13 seems to have some issues with our dependencies and both numpy and setuptools fails to install.

PiperOrigin-RevId: 689955916
@mkruskal-google mkruskal-google merged commit acaece6 into 28.x Nov 25, 2024
172 checks passed
@mkruskal-google mkruskal-google deleted the infinity-nan branch November 25, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-port Cherrypick PRs to release branches upb
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants