-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
GH-131288: use _AddressOfReturnAddress in _Py_get_machine_stack_pointer to silence MSVC warning in pycore_ceval.h for release builds #131289
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
Conversation
Include/internal/pycore_ceval.h
Outdated
#ifdef _MSC_VER | ||
#pragma warning(push) | ||
#pragma warning(disable:4172) | ||
#endif |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use _AddressOfReturnAddress
and avoid the UB on Windows?
https://learn.microsoft.com/en-us/cpp/intrinsics/addressofreturnaddress?view=msvc-170
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great - even better!
See https://godbolt.org/z/7c9Gq9jzM, that should work out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it works on Windows arm64 too.
GitHub actions was having some trouble, so I merged main into the PR to give it a kick |
!buildbot Windows |
🤖 New build scheduled with the buildbot fleet by @colesbury for commit 66f5bc5 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131289%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
Oh, my beloved See #114911. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@markshannon - would you like to review this? |
Shall we get this into the last alpha? Or before beta 1? Or no need at all? The AMD64 Windows PGO NoGIL failure is definitely unrelated, if this is blocking ... |
Thanks for the reminder |
…al.h (pythongh-131289) Use `_AddressOfReturnAddress` in `_Py_get_machine_stack_pointer` to silence MSVC warning in pycore_ceval.h for release builds.
For details please see #131288.
I think this is a skip news.