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 rupole
Recipients rupole
Date 2008-09-23.13:54:48
SpamBayes Score 1.0818532e-05
Marked as misclassified No
Message-id <1222178158.76.0.378001331035.issue3946@psf.upfronthosting.co.za>
In-reply-to
Content
Sample code:
	PyObject *b=PyBytes_FromString("eh ?????");
	PyObject *mv=PyMemoryView_FromObject(b);
	PyObject_CheckReadBuffer(mv);

From following the chain of calls in PyObject_CheckReadBuffer,
a few things are unclear.

It calls bf_getbuffer with a NULL Py_Buffer pointer, although the PEP
explicitely states that is should never be NULL.

PyBuffer_FillInfo immediately returns success if the view pointer is
NULL.  I'm guessing this is to just determine if the operation could be
completed, but it returns before any checks are done.

It then attempts to release a hardcoded NULL Py_buffer pointer
which of course crashes.
History
Date User Action Args
2008-09-23 13:55:58rupolesetrecipients: + rupole
2008-09-23 13:55:58rupolesetmessageid: <1222178158.76.0.378001331035.issue3946@psf.upfronthosting.co.za>
2008-09-23 13:54:49rupolelinkissue3946 messages
2008-09-23 13:54:48rupolecreate