Skip to content

gh-132744: Check recursion limit in _PY_FRAME_GENERAL #132746

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Apr 20, 2025

@python-cla-bot
Copy link

python-cla-bot bot commented Apr 20, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@markshannon
Copy link
Member

Would it be better to add the _CHECK_STACK_SPACE micro-op to the CALL_PY_GENERAL and CALL_BOUND_METHOD_GENERAL macro instructions?

@Fidget-Spinner
Copy link
Member Author

Would it be better to add the _CHECK_STACK_SPACE micro-op to the CALL_PY_GENERAL and CALL_BOUND_METHOD_GENERAL macro instructions?

Done.

@Fidget-Spinner
Copy link
Member Author

Fidget-Spinner commented Apr 29, 2025

Actually, those two instructions don't need to check stack space (they use the frame push that can fail, instead of the one that pushes without checks), they only need to check recursion remaining. So I split it into another uop to make things more efficient.

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

Thanks

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