This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, pablogsal, serhiy.storchaka, vstinner
Date 2019-03-22.13:32:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553261560.24.0.942373542817.issue36389@roundup.psfhosted.org>
In-reply-to
Content
I don't think calling APIs like _PyDict_CheckConsistency() is super useful.  Can the PR find bugs like issue33803 quickly?

I think calling tp_traverse is better.


static int
check_object(PyObject *obj, void *unused)
{
    _PyObject_ASSERT(obj, Py_REFCNT(obj) > 0);
    return 0;
}

static void
gc_check_object(PyGC_Head *gc)
{
    PyObject *op = FROM_GC(gc);
    _PyObject_ASSERT(op, Py_REFCNT(obj) > 0);
    _PyObject_ASSERT(op, _PyObject_GC_IS_TRACKED(op));
    Py_Type(op)->tp_traverse(op, (visitproc)check_object, NULL);
}
History
Date User Action Args
2019-03-22 13:32:40methanesetrecipients: + methane, vstinner, serhiy.storchaka, pablogsal
2019-03-22 13:32:40methanesetmessageid: <1553261560.24.0.942373542817.issue36389@roundup.psfhosted.org>
2019-03-22 13:32:40methanelinkissue36389 messages
2019-03-22 13:32:40methanecreate