gh-137400: Fix a crash when disabling profiling across all threads (gh-137471)
The `PyEval_SetProfileAllThreads` function and other related functions had a race condition on `tstate->c_profilefunc` that could lead to a crash when disable profiling or tracing on all threads while another thread is starting to profile or trace a a call. There are still potential crashes when threads exit concurrently with profiling or tracing be enabled/disabled across all threads.
S
Sam Gross committed
362692852f13cdd1d33cc7ed35c0cbac7af1a785
Parent: deb0020
Committed by GitHub <noreply@github.com>
on 8/11/2025, 3:41:44 PM