Commit f29f878
committed
gh-137400: Stop the world when swapping profile functions
One thread's profile function or profile object can be changed from
another thread, for instance by `sys._setprofileallthreads`. This can
lead to crashes unless the two threads are synchronized. We need
a stop-the-world to ensure that the thread whose profile function or
profile object is being changed is in a state where it's not in the
middle of using either of those pointers.
Signed-off-by: Matt Wozniski <mwozniski@bloomberg.net>1 parent 481d5b5 commit f29f878
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
484 | 484 | | |
485 | 485 | | |
486 | 486 | | |
| 487 | + | |
| 488 | + | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
493 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
494 | 500 | | |
495 | 501 | | |
496 | 502 | | |
| |||
0 commit comments