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-94262: Don't create frame objects for frames that aren't complete. #94371

Merged
merged 11 commits into from
Jul 1, 2022

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jun 28, 2022

Since 3.11 we have moved some low level operations to the bytecode which mean that frames can be in a partially constructed state during GC, or other operations that could expose them to Python code (or third party C code).

We already avoid tracing any instructions before the first RESUME when executing a frame.
This PR prevents creating a frame object before the first RESUME has been reached.

@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 28, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 5043a8b 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 28, 2022
@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@markshannon
Copy link
Member Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@pablogsal: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from pablogsal June 28, 2022 12:10
@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 29, 2022
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 939769c 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 29, 2022
@markshannon markshannon merged commit 544531d into python:main Jul 1, 2022
@miss-islington
Copy link
Contributor

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 1, 2022
… complete. (pythonGH-94371)

(cherry picked from commit 544531d)

Co-authored-by: Mark Shannon <mark@hotpy.org>
@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Jul 1, 2022
@bedevere-bot
Copy link

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

pablogsal pushed a commit that referenced this pull request Jul 4, 2022
…t complete. (GH-94371) (#94482)

Co-authored-by: Mark Shannon <mark@hotpy.org>
@markshannon markshannon deleted the no-frame-object-too-early branch September 26, 2023 12:49
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.

5 participants