Skip to content

gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h#146229

Merged
colesbury merged 1 commit intopython:mainfrom
colesbury:gh-146227-fix-pyatomic-bugs
Mar 20, 2026
Merged

gh-146227: Fix wrong type in _Py_atomic_load_uint16 in pyatomic_std.h#146229
colesbury merged 1 commit intopython:mainfrom
colesbury:gh-146227-fix-pyatomic-bugs

Conversation

@colesbury
Copy link
Contributor

@colesbury colesbury commented Mar 20, 2026

Also fix a few related issues in the pyatomic headers:

  • Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32 on ARM64 instead of a plain volatile store (which is only relaxed on ARM64).
  • Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.
  • Fix pseudo-code comment for _Py_atomic_store_ptr_release in pyatomic.h.

…_std.h

Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).
* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.
* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
pyatomic.h.
@colesbury colesbury added topic-free-threading needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Mar 20, 2026
@colesbury colesbury marked this pull request as ready for review March 20, 2026 17:24
@colesbury colesbury requested a review from mpage March 20, 2026 17:24
Copy link
Member

@corona10 corona10 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 colesbury merged commit 1eff27f into python:main Mar 20, 2026
62 checks passed
@colesbury colesbury deleted the gh-146227-fix-pyatomic-bugs branch March 20, 2026 19:38
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @colesbury, I could not cleanly backport this to 3.14 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1eff27f2c0452b3114bcf139062c87c025842c3e 3.14

@miss-islington-app
Copy link

Sorry, @colesbury, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 1eff27f2c0452b3114bcf139062c87c025842c3e 3.13

colesbury added a commit to colesbury/cpython that referenced this pull request Mar 20, 2026
…yatomic_std.h (pythongh-146229)

Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.
(cherry picked from commit 1eff27f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Mar 20, 2026

GH-146232 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Mar 20, 2026
colesbury added a commit to colesbury/cpython that referenced this pull request Mar 20, 2026
…yatomic_std.h (pythongh-146229)

Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.
(cherry picked from commit 1eff27f)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Mar 20, 2026

GH-146233 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Mar 20, 2026
@colesbury colesbury removed their assignment Mar 20, 2026
colesbury added a commit that referenced this pull request Mar 20, 2026
…c_std.h (gh-146229) (#146232)

Also fix a few related issues in the pyatomic headers:

* Fix _Py_atomic_store_uint_release in pyatomic_msc.h to use __stlr32
  on ARM64 instead of a plain volatile store (which is only relaxed on
  ARM64).

* Add missing _Py_atomic_store_uint_release to pyatomic_gcc.h.

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.

(cherry picked from commit 1eff27f)
colesbury added a commit that referenced this pull request Mar 20, 2026
…c_std.h (gh-146229) (#146233)

Also fix a related issue in the pyatomic headers:

* Fix pseudo-code comment for _Py_atomic_store_ptr_release in
  pyatomic.h.

(cherry picked from commit 1eff27f)
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.

2 participants