FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-94262: Don't create frame objects for frames that aren't complete. by markshannon · Pull Request #94371 · python/cpython · GitHub

/ cpython Public

GH-94262: Don't create frame objects for frames that aren't complete. - #94371

Merged
markshannon merged 11 commits into
python:mainfrom
faster-cpython:no-frame-object-too-early
Jul 1, 2022
Merged

GH-94262: Don't create frame objects for frames that aren't complete.#94371
markshannon merged 11 commits into
python:mainfrom
faster-cpython:no-frame-object-too-early

Conversation

markshannon commented Jun 28, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

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 added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 28, 2022

Copy link
Copy Markdown

🤖 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 removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 28, 2022
Comment thread Lib/test/test_generators.py Outdated

Copy link
Copy Markdown

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

Comment thread Include/internal/pycore_frame.h Outdated
Comment thread Include/internal/pycore_frame.h Outdated

Copy link
Copy Markdown
Member Author

I have made the requested changes; please review again.

Copy link
Copy Markdown

Thanks for making the requested changes!

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

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

Copy link
Copy Markdown

🤖 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 removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Jun 29, 2022
markshannon merged commit 544531d into python:main Jul 1, 2022

Copy link
Copy Markdown
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 removed the needs backport to 3.11 only security fixes label Jul 1, 2022

Copy link
Copy Markdown

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 deleted the no-frame-object-too-early branch September 26, 2023 12:49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL