Tom Flanagan added the comment:
Fix memoryview object allocations to copy format string
--
keywords: +patch
Added file: http://bugs.python.org/file36966/22668patch.diff
___
Python tracker
<http://bugs.python.org/issue22
New submission from Tom Flanagan:
When slicing or cloning a memoryview object that has been previously cast to
change its format string, the new memoryview's format shares a pointer to the
parent's format string, which may be deleted at any time.
This manifests as a corrupt format
Tom Flanagan added the comment:
Included python test case which causes a segmentation fault on
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 10:45:13) [MSC v.1600 64 bit
(AMD64)] on win32
Python 3.4.0 (default, Apr 11 2014, 13:05:11) [GCC 4.8.2] on linux
Python 3.5.0a0 (default
New submission from Tom Flanagan:
call_tzinfo_method in Modules/_datetimemodule.c:900 calls Py_DECREF(offset)
before trying to use offset to generate a TypeError message.
This causes a crash if that was the last reference to offset and Py_DECREF
clears it.
--
components: Library (Lib