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-128421: Avoid TSAN warnings in sys._current_frames()#131548

Merged
colesbury merged 1 commit intopython:mainfrom
colesbury:gh-128421-frame-lasti
Mar 24, 2025
Merged

gh-128421: Avoid TSAN warnings in sys._current_frames()#131548
colesbury merged 1 commit intopython:mainfrom
colesbury:gh-128421-frame-lasti

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commentedMar 21, 2025
edited by bedevere-appbot
Loading

This tells TSAN not to sanitize PyUnstable_InterpreterFrame_GetLine(). There's a possible data race on the access to the frame's instr_ptr if the frame is currently executing. We don't really care about the race. In theory, we could use relaxed atomics for every access toinstr_ptr, but that would create more code churn and current compilers are overly conservative with optimizations around relaxed atomic accesses.

We also don't sanitize _PyFrame_IsIncomplete() because it accessesinstr_ptr and is called from assertions within PyFrame_GetCode().

This tells TSAN not to sanitize PyUnstable_InterpreterFrame_GetLine().There's a possible data race on the access to the frame's instr_ptrif the frame is currently executing. We don't really care about therace. In theory, we could use relaxed atomics for every access to`instr_ptr`, but that would create more code churn and current compilersare overly conservative with optimizations around relaxed atomicaccesses.We also don't sanitize _PyFrame_IsIncomplete() because it accesses`instr_ptr` and is called from assertions within PyFrame_GetCode().
@colesburycolesbury marked this pull request as ready for reviewMarch 21, 2025 17:08
@colesburycolesbury added the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 21, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by@colesbury for commit9213b55 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F131548%2Fmerge

If you want to schedule another build, you need to add the🔨 test-with-buildbots label again.

@bedevere-botbedevere-bot removed the 🔨 test-with-buildbotsTest PR w/ buildbots; report in status section labelMar 21, 2025
@colesburycolesbury merged commitda6730c intopython:mainMar 24, 2025
128 checks passed
@colesburycolesbury deleted the gh-128421-frame-lasti branchMarch 24, 2025 13:49
diegorusso pushed a commit to diegorusso/cpython that referenced this pull requestApr 1, 2025
…ongh-131548)This tells TSAN not to sanitize `PyUnstable_InterpreterFrame_GetLine()`.There's a possible data race on the access to the frame's `instr_ptr`if the frame is currently executing. We don't really care about therace. In theory, we could use relaxed atomics for every access to`instr_ptr`, but that would create more code churn and current compilersare overly conservative with optimizations around relaxed atomicaccesses.We also don't sanitize `_PyFrame_IsIncomplete()` because it accesses`instr_ptr` and is called from assertions within PyFrame_GetCode().
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@kumaraditya303kumaraditya303kumaraditya303 approved these changes

@mpagempageAwaiting requested review from mpage

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@colesbury@bedevere-bot@kumaraditya303

[8]ページ先頭

©2009-2026 Movatter.jp