Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
GH-99205: Mark new interpreters and threads as non-static#99268
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM
I've pointed out two places where a comment would be appropriate. I'm approving the PR under the assumption you'll take care of those.
Uh oh!
There was an error while loading.Please reload this page.
| memcpy(tstate, | ||
| &initial._main_interpreter._initial_thread, | ||
| sizeof(*tstate)); | ||
| tstate->_static= false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Please add a note pointing toPyThreadState_INIT() and indicating that fields set there should be adjusted here as appropriate.
| // Set to _PyInterpreterState_INIT. | ||
| memcpy(interp,&initial._main_interpreter, | ||
| sizeof(*interp)); | ||
| interp->_static= false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Likewise, a note pointing toPyInterpreterState_INIT().
Thanks for fixing this, BTW. |
@pablogsal, leak tests didn't catch this because we use the "raw" domain to allocate |
Oh interesting, can you confirm that changing the domain to memory makes the test fail? |
brandtbucher commentedNov 9, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
You can't. :) See this comment: Lines 818 to 821 in58ee5d8
|
Thanks@brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
bedevere-bot commentedNov 9, 2022
GH-99301 is a backport of this pull request to the3.11 branch. |
…onGH-99268)(cherry picked from commit283ab0e)Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
Uh oh!
There was an error while loading.Please reload this page.
PyThreadStateandPyInterpreterStateare not freed #99205