mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-127316: fix incorrect assertion in setting __class__
in free-threading (#127399)
This commit is contained in:
parent
b14fdadc6c
commit
45c5cba318
2 changed files with 16 additions and 1 deletions
|
@ -7300,7 +7300,7 @@ _PyDict_DetachFromObject(PyDictObject *mp, PyObject *obj)
|
|||
|
||||
// We could be called with an unlocked dict when the caller knows the
|
||||
// values are already detached, so we assert after inline values check.
|
||||
_Py_CRITICAL_SECTION_ASSERT_OBJECT_LOCKED(mp);
|
||||
ASSERT_WORLD_STOPPED_OR_OBJ_LOCKED(mp);
|
||||
assert(mp->ma_values->embedded == 1);
|
||||
assert(mp->ma_values->valid == 1);
|
||||
assert(Py_TYPE(obj)->tp_flags & Py_TPFLAGS_INLINE_VALUES);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue