You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
_Py_get_machine_stack_pointer() does not compile with MinGW on Windows #158165
The same bug affects _Py_get_machine_stack_pointer() in Include/internal/pycore_pystate.h: the intrinsic branches are guarded by _M_ARM64/_M_X64 only,
which mingw-w64 also defines, so MinGW toolchains hit MSVC-only intrinsics.
error: call to undeclared function '__getReg'; ISO C99 and later do not support implicit function declarations
x64: _AddressOfReturnAddress() is only declared by mingw-w64, never defined, so it becomes an undefined external call (jmp _AddressOfReturnAddress) and fails at link time. https://godbolt.org/z/qb7PvvMGG
The __x86_64__ fallback "{movq %%rsp, %0" is missing the |intel} half of the dialect alternative. It works in AT&T mode, but breaks with -masm=intel. It should take the same approach as _Py_ThreadId(), something like: "{movq %%rsp, %0|mov %0, rsp}".
Activity
pythongh-158165: Fix _Py_get_machine_stack_pointer() compilation with…
gh-158165: Fix _Py_get_machine_stack_pointer() compilation with MinGW (…