Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-104584: Restoreframe->stacktop on optimizer error#108953

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

Merged
brandtbucher merged 2 commits intopython:mainfrombrandtbucher:optimizer-error
Sep 6, 2023

Conversation

@brandtbucher
Copy link
Member

@brandtbucherbrandtbucher commentedSep 5, 2023
edited by bedevere-bot
Loading

@brandtbucherbrandtbucher added interpreter-core(Objects, Python, Grammar, and Parser dirs) type-crashA hard crash of the interpreter, possibly with a core dump labelsSep 5, 2023
@brandtbucherbrandtbucher self-assigned thisSep 5, 2023
@brandtbucherbrandtbucher changed the titleGH-104584: Restorestack_pointer on optimizer errorGH-104584: Restoreframe->stacktop on optimizer errorSep 5, 2023
Copy link
Member

@gvanrossumgvanrossum left a comment

Choose a reason for hiding this comment

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

Just ran into this by coincidence. Fine to merge, but I do have a quibble (more aimed at@markshannon perhaps :-).

if (err <=0) {
assert(executor==NULL);
if (err<0) {
_PyFrame_SetStackPointer(frame,stack_pointer);
Copy link
Member

Choose a reason for hiding this comment

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

Oh, interesting. It seems this is needed because whenJUMP_BACKWARD calls_PyOptimizer_BackEdge it doesn't update the stack pointer in the frame, it just passes the stack pointer to the optimizer, which upon success passes it to the executor, which will eventually callSTORE_SP() to update the stack pointer in the frame. And sure, this PR seems to fix the hole, but I wonder if it wouldn't be more robust to just save it before even calling_PyOptimizer_BackEdge.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@gvanrossumgvanrossumgvanrossum approved these changes

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

@brandtbucherbrandtbucher

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dump

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@brandtbucher@gvanrossum@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp