Commit 20f0380
[3.14] pythongh-136870: fix data race in
pythongh-136870: fix data race in `PyThreadState_Clear` on `sys_tracing_threads` (pythonGH-136951)
In free-threading, multiple threads can be cleared concurrently as such the modifications on `sys_tracing_threads` should be done while holding the profile lock, otherwise it can race with other threads setting up profiling.
(cherry picked from commit f183996)
Co-authored-by: Kumar Aditya <[email protected]>PyThreadState_Clear on sys_tracing_threads (pythonGH-136951) (python#136953)1 parent ec509d3 commit 20f0380
1 file changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1793 | 1793 | | |
1794 | 1794 | | |
1795 | 1795 | | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
1796 | 1800 | | |
1797 | 1801 | | |
1798 | 1802 | | |
| |||
1801 | 1805 | | |
1802 | 1806 | | |
1803 | 1807 | | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
1804 | 1813 | | |
1805 | 1814 | | |
1806 | 1815 | | |
| |||
0 commit comments