Skip to content

[3.14] gh-157415: Fix data race in pthread wrapper (#157430) - #159547

Merged
vstinner merged 1 commit into
python:3.14from
vstinner:pthread14
Oct 16, 2026
Merged

vstinner merged 1 commit into
python:3.14from
vstinner:pthread14

Conversation

@vstinner

@vstinner vstinner commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Use free() instead of PyMem_RawFree() in pythread_wrapper() to avoid a data race if another thread calls PyMem_SetAllocator() in parallel.

(cherry picked from commit d1878cc)

Use free() instead of PyMem_RawFree() in pythread_wrapper() to avoid
a data race if another thread calls PyMem_SetAllocator() in parallel.

Reenable @nomemtest tests on TSAN.

Co-authored-by: Nathan Goldbaum <nathan.goldbaum@gmail.com>
(cherry picked from commit d1878cc)
@vstinner
vstinner enabled auto-merge (squash) October 16, 2026 15:26
@vstinner
vstinner merged commit 7c04882 into python:3.14 Oct 16, 2026
51 checks passed
@vstinner
vstinner deleted the pthread14 branch October 16, 2026 15:55
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.

1 participant