Skip to content

[3.13] gh-122695: Fix double-free when using gc.get_referents with a freed _asyncio.FutureIter#122837

Merged
kumaraditya303 merged 5 commits into
python:3.13from
ZeroIntensity:gc-segfault-fix-313
Aug 9, 2024
Merged

[3.13] gh-122695: Fix double-free when using gc.get_referents with a freed _asyncio.FutureIter#122837
kumaraditya303 merged 5 commits into
python:3.13from
ZeroIntensity:gc-segfault-fix-313

Conversation

@ZeroIntensity

Copy link
Copy Markdown
Member

@colesbury

Copy link
Copy Markdown
Contributor

I think it's worth including the test case from #122834

@ZeroIntensity

Copy link
Copy Markdown
Member Author

I think it's worth including the test case from #122834

Oh yeah, forgot to add that here as well. It's there now.

Comment thread Lib/test/test_asyncio/test_futures.py
Comment thread Modules/_asynciomodule.c Outdated
@ZeroIntensity ZeroIntensity requested a review from vstinner August 9, 2024 10:08
Comment thread Lib/test/test_asyncio/test_futures.py Outdated

@vstinner vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vstinner

vstinner commented Aug 9, 2024

Copy link
Copy Markdown
Member

Changes in the 3.13 branch currently need approvals from two core devs.

@ZeroIntensity

Copy link
Copy Markdown
Member Author

@colesbury, could you take a look?

@kumaraditya303 kumaraditya303 merged commit e8fb088 into python:3.13 Aug 9, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @ZeroIntensity for the PR, and @kumaraditya303 for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @ZeroIntensity and @kumaraditya303, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker e8fb088dbaa71dd5f0146b2f4a8f7ecbe2ce9625 3.12

@ZeroIntensity ZeroIntensity deleted the gc-segfault-fix-313 branch August 9, 2024 14:07
@bedevere-app

bedevere-app Bot commented Aug 9, 2024

Copy link
Copy Markdown

GH-122859 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Aug 9, 2024
vstinner pushed a commit to vstinner/cpython that referenced this pull request Aug 9, 2024
… with a freed `_asyncio.FutureIter` (python#122837)

* Backport python#122834 for 3.13

(cherry picked from commit e8fb088)
vstinner added a commit that referenced this pull request Aug 9, 2024
…a freed `_asyncio.FutureIter` (#122837) (#122859)

[3.13] gh-122695: Fix double-free when using `gc.get_referents` with a freed `_asyncio.FutureIter` (#122837)

* Backport #122834 for 3.13

(cherry picked from commit e8fb088)

Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants