gh-137992: fix PyRefTracer_SetTracer to start world before returning (#138925)

fix deadlock in PyRefTracer_SetTracer
This commit is contained in:
Kumar Aditya 2025-09-15 20:09:15 +05:30 committed by GitHub
parent a003112821
commit 5c4bb9b7f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3292,6 +3292,7 @@ int PyRefTracer_SetTracer(PyRefTracer tracer, void *data) {
if (_PyRuntime.ref_tracer.tracer_func != NULL) {
_PyReftracerTrack(NULL, PyRefTracer_TRACKER_REMOVED);
if (PyErr_Occurred()) {
_PyEval_StartTheWorldAll(&_PyRuntime);
return -1;
}
}