mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
GH-91079: Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now (GH130413)
Revert "GH-91079: Implement C stack limits using addresses, not counters. (GH-130007)" for now
Unfortunatlely, the change broke some buildbots.
This reverts commit 2498c22fa0.
This commit is contained in:
parent
0ff1611574
commit
ef29104f7d
47 changed files with 1466 additions and 1220 deletions
|
|
@ -653,6 +653,7 @@ def has_error_without_pop(op: parser.CodeDef) -> bool:
|
|||
"_PyUnicode_JoinArray",
|
||||
"_Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY",
|
||||
"_Py_DECREF_NO_DEALLOC",
|
||||
"_Py_EnterRecursiveCallTstateUnchecked",
|
||||
"_Py_ID",
|
||||
"_Py_IsImmortal",
|
||||
"_Py_LeaveRecursiveCallPy",
|
||||
|
|
@ -672,7 +673,6 @@ def has_error_without_pop(op: parser.CodeDef) -> bool:
|
|||
"initial_temperature_backoff_counter",
|
||||
"JUMP_TO_LABEL",
|
||||
"restart_backoff_counter",
|
||||
"_Py_ReachedRecursionLimit",
|
||||
)
|
||||
|
||||
def find_stmt_start(node: parser.CodeDef, idx: int) -> lexer.Token:
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
# define MAXSTACK 4000
|
||||
# endif
|
||||
#else
|
||||
# define MAXSTACK 4000
|
||||
# define MAXSTACK 6000
|
||||
#endif
|
||||
|
||||
"""
|
||||
|
|
@ -380,7 +380,7 @@ def __init__(
|
|||
self.cleanup_statements: List[str] = []
|
||||
|
||||
def add_level(self) -> None:
|
||||
self.print("if (p->level++ == MAXSTACK || _Py_ReachedRecursionLimitWithMargin(PyThreadState_Get(), 1)) {")
|
||||
self.print("if (p->level++ == MAXSTACK) {")
|
||||
with self.indent():
|
||||
self.print("_Pypegen_stack_overflow(p);")
|
||||
self.print("}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue