[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-02 Thread Stefan Krah
Stefan Krah added the comment: Thanks, no big problem. The thing is that the parts I wrote (Modules/_decimal/*, Objects/memoryobject.c, Modules/_testbuffer.c) have been audited rather heavily and have 100% code coverage with a privately maintained patch that inserts allocation failures. There

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Strange bug. I can't attach any file. -- ___ Python tracker ___ ___

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for my bad wording. I wasn't going to blame or insult anybody. -- ___ Python tracker ___

[issue25525] Deallocation scheme for memoryview is unsafe

2015-11-01 Thread Stefan Krah
Stefan Krah added the comment: First of all, the premise "exports > 0" in your example looks wrong to me. The deallocation process for the first view should start precisely when it no longer has any exports. In fact, the check for "exports > 0" is for the case when memoryview.release() is

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: WTF? Where is my patch? -- ___ Python tracker ___ ___ Python-bugs-list

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Deallocation scheme for memoryview is complex and unsafe. It crashes with chained memoryviews (issue25498), but I suppose deallocating unchained memoryview can crash too if the memoryview itself had exported buffers (self->exports != 0). Both memoryview

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Stefan Krah
Stefan Krah added the comment: The "chained memoryviews" you refer to are a hack and simply aren't supported. Please stop spreading FUD. -- ___ Python tracker

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Martin Panter
Martin Panter added the comment: Did you forget your patch? :) -- nosy: +martin.panter ___ Python tracker ___

[issue25525] Deallocation scheme for memoryview is unsafe

2015-10-31 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, the "chained memoryviews" in ctypes are a hack and it will be eliminated. But this hack exposed possible weak point in memoryview. -- ___ Python tracker