-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-33608: Fix the Py_atomic_* macros. #12240
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
bpo-33608: Fix the Py_atomic_* macros. #12240
Conversation
@ericsnowcurrently: Please replace |
|
I'm pretty sure this isn't due to this commit. |
@@ -407,13 +407,13 @@ typedef struct _Py_atomic_int { | |||
#define _Py_atomic_store_32bit(ATOMIC_VAL, NEW_VAL, ORDER) \ | |||
switch (ORDER) { \ | |||
case _Py_memory_order_acquire: \ | |||
_InterlockedExchange_acq((volatile long*)ATOMIC_VAL, (int)NEW_VAL); \ | |||
_InterlockedExchange_acq((volatile long*)&((ATOMIC_VAL)->_value), (int)NEW_VAL); \ |
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.
This ends up evaluating to _InterlockedExchange_acq((volatile long*)&((&((&_PyRuntime.ceval.gil.last_holder)->_value))->_value) causing a build error for _M_ARM
The macros currently work because our usage happens to parse correctly. I ran into the problem while working on a PR (for bpo-33608) that involves a pointer indirection.
Note that this was part of a PR (gh-12062) that already landed and had to be reverted. This is the part that was unrelated to the need to revert.
https://bugs.python.org/issue33608