gh-132744: Check recursion limit in _PY_FRAME_GENERAL by Fidget-Spinner · Pull Request #132746 · python/cpython
-
-
Notifications
You must be signed in to change notification settings - Fork 34.7k
Conversation
Would it be better to add the _CHECK_STACK_SPACE micro-op to the CALL_PY_GENERAL and CALL_BOUND_METHOD_GENERAL macro instructions?
Would it be better to add the
_CHECK_STACK_SPACEmicro-op to theCALL_PY_GENERALandCALL_BOUND_METHOD_GENERALmacro instructions?
Done.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Sorry, @Fidget-Spinner and @markshannon, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker ddac7ac59a7dfa4437562b6e705e64865c3b1e9a 3.13