[New-bugs-announce] [issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures
report at bugs.python.org
Wed Apr 20 12:04:28 EDT 2016
New submission from unsec treedee:
The garbage collector is not behaving consistently across platforms for python 2.7.11.
I realize that the example code and style is not proper :-)
On the Mac OSX platform this code runs without the garbage collector "cleaning house" and there is no resulting crash from a NULL pointer. On the Linux platform the garbage collector decides to "clean house" (deallocates the object) resulting in a NULL pointer which is not handled correctly by the c-function code (some legacy stuff) and causes a segmentation fault.
Temporarily disabling the garbage collector and enabling it later on allows a workaround (valid or not) that is consistent on all platforms.
Improper coding and style aside... the issue I am reporting is the inconsistent behaviour of the garbage collector. I am looking for consistency across platforms (same result on all platforms). :-)
nosy: unsec treedee
title: inconsistent garbage collector behavior across platforms when using ctypes data-structures
versions: Python 2.7
Added file: http://bugs.python.org/file42539/gc_snippet_report_pybug.py
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce