Message253950
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. |
|
Date |
User |
Action |
Args |
2015-11-02 23:41:04 | martin.panter | set | recipients:
+ martin.panter, jnoller, r.david.murray, skrah, sbt, zach.ware, serhiy.storchaka, JakeMont |
2015-11-02 23:41:04 | martin.panter | set | messageid: <1446507664.19.0.95824730029.issue25498@psf.upfronthosting.co.za> |
2015-11-02 23:41:04 | martin.panter | link | issue25498 messages |
2015-11-02 23:41:03 | martin.panter | create | |
|