On memory error, dump the memory block traceback

Issue #26564: _PyObject_DebugDumpAddress() now dumps the traceback where a
memory block was allocated on memory block. Use the tracemalloc module to get
the traceback.
This commit is contained in:
Victor Stinner 2016-03-15 22:22:13 +01:00
parent af584a02a5
commit 0611c26a58
8 changed files with 126 additions and 19 deletions

View file

@ -486,9 +486,9 @@ _Py_hashtable_copy(_Py_hashtable_t *src)
void *data, *new_data;
dst = _Py_hashtable_new_full(src->data_size, src->num_buckets,
src->hash_func, src->compare_func,
src->copy_data_func, src->free_data_func,
src->get_data_size_func, &src->alloc);
src->hash_func, src->compare_func,
src->copy_data_func, src->free_data_func,
src->get_data_size_func, &src->alloc);
if (dst == NULL)
return NULL;