Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-101975: Fixed a potential SegFault on garbage collection #102803

Merged
merged 2 commits into from
Mar 18, 2023

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Mar 18, 2023

frame->stacktop = 1 is missing on trace entry which could cause the gc on another thread to access freed memory.

@markshannon markshannon self-requested a review March 18, 2023 10:55
Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Looks good.

I quickly checked the other uses of _PyFrame_GetStackPointer(frame) and this is the odd one out.

@markshannon markshannon added the needs backport to 3.11 only security fixes label Mar 18, 2023
@markshannon markshannon merged commit 039714d into python:main Mar 18, 2023
@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

Sorry, @gaogaotiantian and @markshannon, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 039714d00f147be4d018fa6aeaf174aad7e8fa32 3.11

@bedevere-bot
Copy link

GH-102807 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Mar 18, 2023
@gaogaotiantian gaogaotiantian deleted the fix-issue-101975 branch March 18, 2023 14:41
markshannon added a commit that referenced this pull request Mar 20, 2023
…H-102803) (GH-102807)

Authored-by: gaogaotiantian <gaogaotiantian@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants