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).  :-)

----------
components: ctypes
files: gc_snippet_report_pybug.py
messages: 263846
nosy: unsec treedee
priority: normal
severity: normal
status: open
title: inconsistent garbage collector behavior across platforms when using 
ctypes data-structures
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file42539/gc_snippet_report_pybug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26810>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to