gh-126076: Account for relocated objects in tracemalloc (#126077)

This commit is contained in:
Pablo Galindo Salgado 2024-11-19 10:35:17 +00:00 committed by GitHub
parent 899fdb213d
commit 30aeb00d36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 25 deletions

View file

@ -3196,6 +3196,7 @@ _PyBytes_Resize(PyObject **pv, Py_ssize_t newsize)
#ifdef Py_TRACE_REFS
_Py_ForgetReference(v);
#endif
_PyReftracerTrack(v, PyRefTracer_DESTROY);
*pv = (PyObject *)
PyObject_Realloc(v, PyBytesObject_SIZE + newsize);
if (*pv == NULL) {