Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-99952: [ctypes] fix refcount issues in from_param() result.#100169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
gpshead merged 8 commits intopython:mainfromynkdir:fix-issue-99952
Jan 26, 2023

Conversation

ynkdir
Copy link
Contributor

@ynkdirynkdir commentedDec 11, 2022
edited by gpshead
Loading

Fixes a reference counting issue withctypes.Structure when 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.

junkmd reacted with hooray emojijunkmd reacted with eyes emoji
@netlify
Copy link

netlifybot commentedDec 11, 2022
edited
Loading

Deploy Preview forpython-cpython-preview canceled.

NameLink
🔨 Latest commitef884f1
🔍 Latest deploy loghttps://app.netlify.com/sites/python-cpython-preview/deploys/6395871f802ebd000860138d

@ghost
Copy link

ghost commentedDec 11, 2022
edited by ghost
Loading

All commit authors signed the Contributor License Agreement.
CLA signed

@ynkdir
Copy link
ContributorAuthor

related changelog
bpo-35947: Update windows to the current version of libffi#11797
bpo-37140: Fix StructUnionType_paramfunc()#15612

@junkmd
Copy link
Contributor

🚀

@FFY00
Copy link
Member

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.

@FFY00FFY00 removed their request for reviewDecember 19, 2022 19:56
@junkmd
Copy link
Contributor

🎄 🎁 🧑‍🎄 🤶
Just remind.

@dpy013
Copy link

hello all
Is there an update on the current pr?

@junkmd
Copy link
Contributor

junkmd commentedJan 14, 2023
edited
Loading

The absence of updates may be because theexpert-ctypes label is not attached to this PR, even though it is attached to issuegh-99952.

Looking at the PRs with theexpert-ctypes label that have been merged, I think the other core developers involved toctypes are@zware,@AA-Turner and@gpshead.

Triage and labeling to PRs seems to be done by@AlexWaygood.

I hope that they are aware of this ping and will respond.

@zware
Copy link
Member

This looks reasonable as far as I can tell, but unfortunately my expertise withctypes only extends as far as removing ancient copies oflibffi from the repository :)

@gpsheadgpshead self-assigned thisJan 26, 2023
@gpsheadgpshead added needs backport to 3.10only security fixes needs backport to 3.11only security fixes type-bugAn unexpected behavior, bug, or error labelsJan 26, 2023
@miss-islington
Copy link
Contributor

Thanks@ynkdir for the PR, and@gpshead for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

@gpshead
Copy link
Member

Thanks everyone, this kind of bug can be particularly challenging to diagnose!

junkmd reacted with heart emoji

@miss-islington
Copy link
Contributor

Sorry,@ynkdir and@gpshead, I could not cleanly backport this to3.11 due to a conflict.
Please backport usingcherry_picker on command line.
cherry_picker dfad678d7024ab86d265d84ed45999e031a03691 3.11

@miss-islington
Copy link
Contributor

Sorry@ynkdir and@gpshead, I had trouble checking out the3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport usingcherry_picker on the command line.
cherry_picker dfad678d7024ab86d265d84ed45999e031a03691 3.10

gpshead pushed a commit to gpshead/cpython that referenced this pull requestJan 26, 2023
…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 commitdfad678)Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
gpshead added a commit that referenced this pull requestJan 26, 2023
… 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 commitdfad678)Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 26, 2023
…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 commitdfad678)(cherry picked from commitfa7c37a)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
@ynkdir
Copy link
ContributorAuthor

Thank you.

karpierz reacted with thumbs up emojijunkmd reacted with hooray emojijunkmd and karpierz reacted with heart emoji

mdboom pushed a commit to mdboom/cpython that referenced this pull requestJan 31, 2023
…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.
gpshead added a commit that referenced this pull requestFeb 4, 2023
…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 commitdfad678)(cherry picked from commitfa7c37a)Co-authored-by: Gregory P. Smith <greg@krypto.org>Co-authored-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>Co-authored-by: Kumar Aditya <59607654+kumaraditya303@users.noreply.github.com>
@zwarezware removed needs backport to 3.10only security fixes needs backport to 3.11only security fixes labelsApr 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@gpsheadgpsheadgpshead approved these changes

Assignees

@gpsheadgpshead

Labels
topic-ctypestype-bugAn unexpected behavior, bug, or error
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

8 participants
@ynkdir@junkmd@FFY00@dpy013@zware@miss-islington@gpshead@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp