Skip to content

Commit

Permalink
Fix race in the interpreter loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mpage committed Apr 18, 2024
1 parent 017885b commit b2075f1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ dummy_func(
if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) {
CHECK_EVAL_BREAKER();
}
#ifndef Py_GIL_DISABLED
this_instr->op.code = RESUME_CHECK;
#endif
}
}

Expand Down
2 changes: 2 additions & 0 deletions Python/generated_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion Tools/tsan/suppressions_free_threading.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ race:_in_weak_set
race:_mi_heap_delayed_free_partial
race:_Py_IsImmortal
race:_Py_IsOwnedByCurrentThread
race:_PyEval_EvalFrameDefault
race:_Py_qsbr_poll
race:_Py_TryIncrefFast
race:_PyFunction_SetVersion
race:_PyImport_AcquireLock
race:_PyImport_ReleaseLock
Expand All @@ -25,24 +26,34 @@ race:_PyInterpreterState_IsRunningMain
race:_PyObject_GC_IS_SHARED
race:_PyObject_GC_SET_SHARED
race:_PyObject_GC_TRACK
race:_PySemaphore_Wait
race:_PyType_HasFeature
race:assign_version_tag
race:compare_unicode_unicode
race:count_next
race:delitem_common
race:detach_thread
race:dictkeys_decref
race:dictkeys_incref
race:dictresize
race:gc_collect_main
race:gc_restore_tid
race:grow_thread_array
race:initialize_new_array
race:insertdict
race:instrument_lock_held
race:internal_connect
race:long_dealloc
race:lookup_tp_dict
race:mi_heap_visit_pages
race:Py_TYPE
race:PyDict_GET_SIZE
race:PyMember_GetOne
race:PyMember_SetOne
race:new_reference
race:set_contains_key
race:set_inheritable
race:sock_recv_impl
race:start_the_world
race:tstate_set_detached
race:unicode_hash

0 comments on commit b2075f1

Please sign in to comment.