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 martin.panter
Recipients JakeMont, jnoller, martin.panter, r.david.murray, sbt, serhiy.storchaka, zach.ware
Date 2015-10-29.00:29:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
I traced this down to part of revision 1da9630e9b7f (Issue #22896). If I revert the changes to CDataType_from_buffer() at <>, the crash no longer happens. I suspect the offending code is this, that is trying to stash the original buffer protocol supporting object into a memory view:

mv = PyMemoryView_FromBuffer(&buffer);
if (mv == NULL) {
    return NULL;
/* Hack the memoryview so that it will release the buffer. */
((PyMemoryViewObject *)mv)->mbuf->master.obj = buffer.obj;
((PyMemoryViewObject *)mv)->view.obj = buffer.obj;
//~ Py_INCREF(buffer.obj);
if (-1 == KeepRef((CDataObject *)result, -1, mv))
    result = NULL;

If I enable my INCREF() line it also stops the crash, but I guess at the expense of a memory leak.
Date User Action Args
2015-10-29 00:29:35martin.pantersetrecipients: + martin.panter, jnoller, r.david.murray, sbt, zach.ware, serhiy.storchaka, JakeMont
2015-10-29 00:29:35martin.pantersetmessageid: <>
2015-10-29 00:29:35martin.panterlinkissue25498 messages
2015-10-29 00:29:35martin.pantercreate