[issue25498] Python 3.4.3 core dump with simple sample code
Serhiy Storchaka
report at bugs.python.org
Fri Oct 30 13:39:59 EDT 2015
Serhiy Storchaka added the comment:
Before committing any solution we first should have understood the cause of the crash. The peculiarity of example ctypes_crash.py is that the argument of ctypes.c_char.from_buffer is a memoryview. With current code we have following chain (the list creates a reference loop with itself):
list->memoryview->ManagedBuffer->memoryview->ManagedBuffer->bytearray
Using PyMemoryView_FromObject or hypothetical PyMemoryView_FromObjectEx we could get shorter chain:
list->memoryview->ManagedBuffer->bytearray
May be the cause not in current hack, but in memoryview that can't survive with breaking long chain? Or may be we just are lucky in latter case?
I share Martin's doubts about writability in Eryksun’s patch.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25498>
_______________________________________
More information about the Python-bugs-list
mailing list