diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-04 19:57:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 19:57:18 (GMT) |
commit | 327a36a4f98466e734bf3b10994290fceab8fdd2 (patch) | |
tree | 2d8a7792df438d9d007da41b2fc66d7fffde68ec /Python/pylifecycle.c | |
parent | 7edc6bd6276ae857928ee7b0e84817c78292939f (diff) | |
download | cpython-327a36a4f98466e734bf3b10994290fceab8fdd2.zip cpython-327a36a4f98466e734bf3b10994290fceab8fdd2.tar.gz cpython-327a36a4f98466e734bf3b10994290fceab8fdd2.tar.bz2 |
[3.13] gh-119999: Fix potential race condition in `_Py_ExplicitMergeRefcount` (GH-120000) (#120073)
We need to write to `ob_ref_local` and `ob_tid` before `ob_ref_shared`.
Once we mark `ob_ref_shared` as merged, some other thread may free the
object because the caller also passes in `-1` as `extra` to give up its
only reference.
(cherry picked from commit 4055577221f5f52af329e87f31d81bb8fb02c504)
Co-authored-by: Sam Gross <colesbury@gmail.com>
Diffstat (limited to 'Python/pylifecycle.c')
0 files changed, 0 insertions, 0 deletions