Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-117657: Fix QSBR race condition#118843

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
colesbury merged 14 commits intopython:mainfromSonicField:main
May 10, 2024
Merged

Conversation

SonicField
Copy link
Contributor

@SonicFieldSonicField commentedMay 9, 2024
edited by bedevere-appbot
Loading

Fix TSAN issues in free threaded build:

  • initialize_new_array

Eclips4and others added11 commitsMay 10, 2024 02:14
…exit}__` (python#118812)These methods are purely wrappers around `Semlock.{acquire,release}`,which expect a critical section to be held.
…ld (python#118723)The `list_preallocate_exact` function did not zero initialize arraycontents. In the free-threaded build, this could expose uninitializedmemory to concurrent readers between the call to`list_preallocate_exact` and the filling of the array contents withitems.
…t file (python#118808)Some embedders and extensions include parts of the internal API. Thepycore_mimalloc.h file is transitively include by a number of otherinternal headers. This avoids include errors for code that wasalready including those headers.
Avoid immortalizing objects in tests that verify garbage collection ofclasses or modules.This fixes test_ordered_dict and test_struct.
…ython#118722)Using `race:` filters out warnings if the function appears anywhere inthe stack trace. This can hide a lot of unrelated warnings, especiallyfor a function like `_PyEval_EvalFrameDefault`, which is somewhere onthe stack more often than not.Change all free-threaded suppressions to `race_top:`, which only matchesthe top frame, and add any new suppressions this exposes.
…NULL object (python#115433)" (python#118861)This reverts commitad4f909.The API ended up not being used.
@colesburycolesbury changed the titlegh-117657: initialize_new_array and othersgh-117657: Fix QSBR race conditionMay 10, 2024
@colesburycolesbury added the needs backport to 3.13bugs and security fixes labelMay 10, 2024
Copy link
Contributor

@colesburycolesbury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@colesburycolesbury merged commit33d2019 intopython:mainMay 10, 2024
@miss-islington-app
Copy link

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestMay 10, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.(cherry picked from commit33d2019)Co-authored-by: Alex Turner <alexturner@meta.com>
@bedevere-app
Copy link

GH-118905 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelMay 10, 2024
colesbury pushed a commit that referenced this pull requestMay 10, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.(cherry picked from commit33d2019)Co-authored-by: Alex Turner <alexturner@meta.com>
estyxx pushed a commit to estyxx/cpython that referenced this pull requestJul 17, 2024
`_Py_qsbr_unregister` is called when the PyThreadState is alreadydetached, so the access to `tstate->qsbr` isn't safe without locking theshared mutex. Grab the `struct _qsbr_shared` from the interpreterinstead.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@colesburycolesburycolesbury approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@gpsheadgpsheadAwaiting requested review from gpshead

@isidenticalisidenticalAwaiting requested review from isidentical

@brettcannonbrettcannonAwaiting requested review from brettcannon

@ncoghlanncoghlanAwaiting requested review from ncoghlan

@warsawwarsawAwaiting requested review from warsaw

@vsajipvsajipAwaiting requested review from vsajip

@methanemethaneAwaiting requested review from methane

@markshannonmarkshannonAwaiting requested review from markshannon

@1st11st1Awaiting requested review from 1st1

@asvetlovasvetlovAwaiting requested review from asvetlov

@gvanrossumgvanrossumAwaiting requested review from gvanrossum

@kumaraditya303kumaraditya303Awaiting requested review from kumaraditya303

@willingcwillingcAwaiting requested review from willingc

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

9 participants
@SonicField@colesbury@Eclips4@mpage@zooba@sobolevn@swtaarrs@JelleZijlstra@xyb

[8]ページ先頭

©2009-2025 Movatter.jp