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-128563: Simplify recursion check in _PyEval_EvalFrameDefault #129481

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jan 30, 2025

@@ -786,7 +786,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int

_PyInterpreterFrame entry_frame;


if (_Py_EnterRecursiveCallTstate(tstate, "")) {
assert(frame->owner != FRAME_OWNED_BY_INTERPRETER);
Copy link
Member

Choose a reason for hiding this comment

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

Don't you need to _Py_LeaveRecursiveCallPy after this as well?

At least from reading the code of exit_unwind.

Copy link
Member Author

@markshannon markshannon Jan 31, 2025

Choose a reason for hiding this comment

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

No. We haven't called _Py_EnterRecursivePy

@bedevere-app
Copy link

bedevere-app bot commented Jan 31, 2025

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-app
Copy link

bedevere-app bot commented Jan 31, 2025

Thanks for making the requested changes!

@Fidget-Spinner: please review the changes made to this pull request.

@bedevere-app bedevere-app bot requested a review from Fidget-Spinner January 31, 2025 12:09
@markshannon markshannon merged commit c3ae5c9 into python:main Jan 31, 2025
54 of 57 checks passed
@markshannon markshannon deleted the earlier-check-recursion branch January 31, 2025 12:12
mpage added a commit to mpage/cpython that referenced this pull request Feb 1, 2025
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Feb 7, 2025
…t` (pythonGH-129481)

Simplify recursion check in _PyEval_EvalFrameDefault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants