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, skrah, zach.ware
Date 2015-11-02.23:41:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446507664.19.0.95824730029.issue25498@psf.upfronthosting.co.za>
In-reply-to
Content
I tend to agree with Serhiy about Eryksun’s patch. I understand it solves the current problem, and continues to protect against this scenario:

>>> b = bytearray(b"a")
>>> c = ctypes.c_char.from_buffer(b)
>>> b *= 1000
BufferError: Existing exports of data: object cannot be re-sized

PyObject_AsWriteBuffer() and PyBuffer_Release() did get changed in 3.4, also by Issue 22896. Reviewing the history (mainly <https://hg.python.org/cpython/diff/1da9630e9b7f/Objects/abstract.c>), the only behaviour change I see is that it now clears view->obj to NULL, via the new PyBuffer_Release() call, before calling DECREF on the object.
History
Date User Action Args
2015-11-02 23:41:04martin.pantersetrecipients: + martin.panter, jnoller, r.david.murray, skrah, sbt, zach.ware, serhiy.storchaka, JakeMont
2015-11-02 23:41:04martin.pantersetmessageid: <1446507664.19.0.95824730029.issue25498@psf.upfronthosting.co.za>
2015-11-02 23:41:04martin.panterlinkissue25498 messages
2015-11-02 23:41:03martin.pantercreate