mirror of
https://github.com/python/cpython.git
synced 2025-11-24 20:30:18 +00:00
gh-137992: fix PyRefTracer_SetTracer to start world before returning (#138925)
fix deadlock in PyRefTracer_SetTracer
This commit is contained in:
parent
a003112821
commit
5c4bb9b7f6
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue