mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-132744: Check recursion limit in CALL_PY_GENERAL (GH-132746)
This commit is contained in:
parent
987e45e632
commit
ddac7ac59a
9 changed files with 220 additions and 170 deletions
22
Python/generated_cases.c.h
generated
22
Python/generated_cases.c.h
generated
|
@ -1907,6 +1907,9 @@
|
|||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
JUMP_TO_PREDICTED(CALL);
|
||||
}
|
||||
}
|
||||
// _CHECK_RECURSION_REMAINING
|
||||
{
|
||||
if (tstate->py_recursion_remaining <= 1) {
|
||||
UPDATE_MISS_STATS(CALL);
|
||||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
|
@ -2022,6 +2025,14 @@
|
|||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
}
|
||||
// flush
|
||||
// _CHECK_RECURSION_REMAINING
|
||||
{
|
||||
if (tstate->py_recursion_remaining <= 1) {
|
||||
UPDATE_MISS_STATS(CALL);
|
||||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
JUMP_TO_PREDICTED(CALL);
|
||||
}
|
||||
}
|
||||
// _PY_FRAME_GENERAL
|
||||
{
|
||||
args = &stack_pointer[-oparg];
|
||||
|
@ -4168,6 +4179,9 @@
|
|||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
JUMP_TO_PREDICTED(CALL);
|
||||
}
|
||||
}
|
||||
// _CHECK_RECURSION_REMAINING
|
||||
{
|
||||
if (tstate->py_recursion_remaining <= 1) {
|
||||
UPDATE_MISS_STATS(CALL);
|
||||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
|
@ -4254,6 +4268,14 @@
|
|||
JUMP_TO_PREDICTED(CALL);
|
||||
}
|
||||
}
|
||||
// _CHECK_RECURSION_REMAINING
|
||||
{
|
||||
if (tstate->py_recursion_remaining <= 1) {
|
||||
UPDATE_MISS_STATS(CALL);
|
||||
assert(_PyOpcode_Deopt[opcode] == (CALL));
|
||||
JUMP_TO_PREDICTED(CALL);
|
||||
}
|
||||
}
|
||||
// _PY_FRAME_GENERAL
|
||||
{
|
||||
args = &stack_pointer[-oparg];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue