[issue22668] memoryview.format is corrupted due to dangling shared pointer
Stefan Krah
report at bugs.python.org
Tue Jan 27 17:16:56 CET 2015
Stefan Krah added the comment:
Thanks for the detailed report! Making a private copy of 'format' for
each memoryview generally sounds like the best solution. However, format
strings can be arbitrarily large, so we'd need to store the copy in the
ob_array after shape, strides and suboffsets.
This of course would slow down memoryview creation in the general case.
Given that the disappearing format strings are only created during casting,
I think we can get away with a local solution (see patch).
----------
Added file: http://bugs.python.org/file37881/issue22668-2.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22668>
_______________________________________
More information about the Python-bugs-list
mailing list