Skip to content

gh-155151: Check recursion limits in specialized Python calls - #156346

Open
marinelay wants to merge 1 commit into
python:mainfrom
marinelay:gh-155151-recursion-check
Open

gh-155151: Check recursion limits in specialized Python calls#156346
marinelay wants to merge 1 commit into
python:mainfrom
marinelay:gh-155151-recursion-check

Conversation

@marinelay

@marinelay marinelay commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Fixes #155151

gh-137887 fixed CALL_KW_PY by adding _CHECK_RECURSION_REMAINING before _PUSH_FRAME.
Without this check, the specialized call path could proceed to _PUSH_FRAME even after the recursion budget had been exhausted.

CALL_EX_PY and CALL_KW_BOUND_METHOD use the same _PUSH_FRAME, but were missing the recursion check.
This PR adds the missing _CHECK_RECURSION_REMAINING to both paths, following the same pattern as gh-137887.

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.

CALL_EX_PY and CALL_KW_BOUND_METHOD can bypass RecursionError after specialization

1 participant