New submission from Roger Upole <[EMAIL PROTECTED]>: 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. ---------- messages: 73640 nosy: rupole severity: normal status: open title: PyObject_CheckReadBuffer crashes on memoryview object _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3946> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com