[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2021-04-25 Thread Irit Katriel


Irit Katriel  added the comment:

I don't think GC is even guaranteed to do exactly the same thing in two 
different runs on the same platform. If objects are hashed by id (memory 
address) and then traversed then couldn't the order in which unrelated objects 
are deleted be non-deterministic?

In any case, 2.7 is no longer maintained. If you can provide a simple repro 
script for 3.9+, a GC expert may look at it. Open a new issue if you do that.

--
nosy: +iritkatriel
resolution:  -> not a bug
stage: test needed -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread Martin Panter

Martin Panter added the comment:

You should write your program so that it does not release objects until they 
are no longer needed, then it can handle the garbage collector running at any 
time. But it is not clear to me what your offending null pointer is. Your code 
has lots of pointers that could be null.

Can you provide a complete demonstration, perhaps using a standard function 
such as libc.printf, rather than your arbitrary function?

--
nosy: +martin.panter
stage:  -> test needed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +amaury.forgeotdarc, belopolsky, meador.inge, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26810] inconsistent garbage collector behavior across platforms when using ctypes data-structures

2016-04-20 Thread unsec treedee

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com