Skip to content

Conversation

@chris-eibl
Copy link
Member

@chris-eibl chris-eibl commented Mar 15, 2025

For details please see #131288.

I think this is a skip news.

#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable:4172)
#endif
Copy link
Contributor

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

Copy link
Member Author

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?

Copy link
Contributor

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.

@colesbury
Copy link
Contributor

GitHub actions was having some trouble, so I merged main into the PR to give it a kick

@colesbury
Copy link
Contributor

!buildbot Windows

@bedevere-bot
Copy link

🤖 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: Windows

The builders matched are:

  • AMD64 Windows11 Refleaks PR
  • ARM64 Windows PR
  • AMD64 Windows PGO NoGIL PR
  • AMD64 Windows PGO PR
  • ARM64 Windows Non-Debug PR
  • AMD64 Windows10 PR
  • AMD64 Windows11 Non-Debug PR
  • AMD64 Windows11 Bigmem PR
  • AMD64 Windows Server 2022 NoGIL PR

@chris-eibl
Copy link
Member Author

Oh, my beloved test_int in https://buildbot.python.org/#/builders/1623/builds/13. Luckily re-run passed.

See #114911.

Copy link
Contributor

@colesbury colesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@colesbury
Copy link
Contributor

@markshannon - would you like to review this?

@chris-eibl chris-eibl changed the title GH-131288: silence warning in pycore_ceval.h GH-131288: use _AddressOfReturnAddress in _Py_get_machine_stack_pointer to silence MSVC warning in pycore_ceval.h for release builds Mar 28, 2025
@chris-eibl
Copy link
Member Author

chris-eibl commented Apr 4, 2025

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 ...

@colesbury
Copy link
Contributor

Thanks for the reminder

@colesbury colesbury merged commit 2009871 into python:main Apr 4, 2025
53 of 54 checks passed
@chris-eibl chris-eibl deleted the fix_warning_pycore_ceval branch April 4, 2025 13:06
seehwan pushed a commit to seehwan/cpython that referenced this pull request Apr 16, 2025
…al.h (pythongh-131289)

Use `_AddressOfReturnAddress` in `_Py_get_machine_stack_pointer` to silence MSVC warning in pycore_ceval.h for release builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants