cpython/Modules/_ctypes
Gregory P. Smith fa7c37af49
[3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (#101339)
[3.11] gh-99952: [ctypes] fix refcount issues in from_param() result. (GH-100169)

Fixes a reference counting issue with `ctypes.Structure` when a `from_param()` method call is used and the structure size is larger than a C pointer `sizeof(void*)`.

This problem existed for a very long time, but became more apparent in 3.8+ by change likely due to garbage collection cleanup timing changes..
(cherry picked from commit dfad678d70)

Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
2023-01-26 01:02:37 -08:00
..
darwin Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
libffi_osx remove the repeat 'the' (#29455) 2021-11-08 10:19:54 +02:00
_ctypes.c [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (#101339) 2023-01-26 01:02:37 -08:00
_ctypes_test.c [3.11] gh-99952: fix refcount issues in ctypes.Structure from_param() result (#101339) 2023-01-26 01:02:37 -08:00
_ctypes_test.h Copy ctypes-0.9.9.4 sources from external into the trunk. 2006-03-08 19:35:11 +00:00
callbacks.c GH-81061: Fix refcount issue when returning None from a ctypes.py_object callback (GH-13364) 2023-01-09 08:06:17 -08:00
callproc.c [3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638) 2022-11-21 11:22:10 +01:00
cfield.c gh-78878: Fix crash when creating an instance of _ctypes.CField (GH-14837) 2022-12-21 10:02:05 -08:00
ctypes.h [3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638) 2022-11-21 11:22:10 +01:00
ctypes_dlfcn.h Remove outdated PEP 291 compatibility requirement comment 2016-05-14 05:55:38 +00:00
malloc_closure.c [3.11] gh-99337: Fix compile errors with gcc 12 on macOS (GH-99470) (#99638) 2022-11-21 11:22:10 +01:00
stgdict.c gh-78878: Fix crash when creating an instance of _ctypes.CField (GH-14837) 2022-12-21 10:02:05 -08:00