gh-99952: [ctypes] fix refcount issues in from_param() result.#100169
gh-99952: [ctypes] fix refcount issues in from_param() result.#100169gpshead merged 8 commits intopython:mainfrom
Conversation
✅ Deploy Preview for python-cpython-preview canceled.
|
|
🚀 |
|
I am not comfortable enough judging if this is the best/correct fix, but it seems like something that @vstinner might enjoy having a look at. |
|
🎄 🎁 🧑🎄 🤶 |
|
hello all |
|
The absence of updates may be because the Looking at the PRs with the Triage and labeling to PRs seems to be done by @AlexWaygood. I hope that they are aware of this ping and will respond. |
|
This looks reasonable as far as I can tell, but unfortunately my expertise with |
|
Thanks everyone, this kind of bug can be particularly challenging to diagnose! |
|
Sorry, @ynkdir and @gpshead, I could not cleanly backport this to |
|
Sorry @ynkdir and @gpshead, I had trouble checking out the |
…esult. (pythonGH-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 dfad678) Co-authored-by: Yukihiro Nakadaira <[email protected]>
… 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 dfad678) Co-authored-by: Yukihiro Nakadaira <[email protected]>
…aram() result (pythonGH-101339) [3.11] pythongh-99952: [ctypes] fix refcount issues in from_param() result. (pythonGH-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 dfad678) (cherry picked from commit fa7c37a) Co-authored-by: Gregory P. Smith <[email protected]> Co-authored-by: Yukihiro Nakadaira <[email protected]>
|
Thank you. |
…ython#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.
…param() result (GH-101339) (#101340) [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 dfad678) (cherry picked from commit fa7c37a) Co-authored-by: Gregory P. Smith <[email protected]> Co-authored-by: Yukihiro Nakadaira <[email protected]> Co-authored-by: Kumar Aditya <[email protected]>
Fixes a reference counting issue with
ctypes.Structurewhen afrom_param()method call is used and the structure size is larger than a C pointersizeof(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.
ctypes.WINFUNCTYPEworks in Python3.7, does not work as same in newer Python #99952