SIGN IN SIGN UP

gh-128421: Avoid TSAN warnings in `sys._current_frames()` (gh-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 the
race. In theory, we could use relaxed atomics for every access to
`instr_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 accesses
`instr_ptr` and is called from assertions within PyFrame_GetCode().
S
Sam Gross committed
da6730caa5023bd351a3f2a1b64b174c8e609489
Parent: 4596666
Committed by GitHub <noreply@github.com> on 3/24/2025, 1:49:39 PM