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
GetLastError() not preserved across GIL operations on Windows #116012
Changes to TLS usage in 3.13 may cause the last error code to be reset when ensuring, checking or releasing the GIL. We need to preserve the value.
PyGILState_Check was already updated, but the other public APIs need the same update. Potentially some of our internal/public ones too. It might just be best to add it to the PyThread_tss_* functions.
Okay, I can confirm that TlsGetValue breaks convention by clearing the last error code on success, as it has no return value that uniquely indicates failure. So we just need to wrap its calls up.
Activity
zooba commentedon Feb 27, 2024
Okay, I can confirm that
TlsGetValuebreaks convention by clearing the last error code on success, as it has no return value that uniquely indicates failure. So we just need to wrap its calls up.pythongh-116012: Preserve GetLastError() across calls to TlsGetValue …
gh-116012: Preserve GetLastError() across calls to TlsGetValue on Win…
pythongh-116012: Preserve GetLastError() across calls to TlsGetValue …
pythongh-116012: Preserve GetLastError() across calls to TlsGetValue …
pythongh-116012: Preserve GetLastError() across calls to TlsGetValue …