Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d3676fb

Browse files
mmohrhardhauntsaninjaserhiy-storchaka
authored andcommitted
[3.11] pythongh-106905: Avoid incorrect SystemError about recursion depth mismatch (python#106906)
Backport of 1447af7 from python#106906. * pythongh-106905: avoid incorrect SystemError about recursion depth mismatch * Update Misc/NEWS.d/next/Core and Builtins/2023-07-20-11-41-16.gh-issue-106905.AyZpuB.rst --------- Co-authored-by: Shantanu <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]>
1 parent ff7dc61 commit d3676fb

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix incorrect SystemError about AST constructor recursion depth mismatch.

Parser/asdl_c.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,7 @@ def func_end(self):
12731273
self.emit("state->recursion_depth--;", 1)
12741274
self.emit("return result;", 1)
12751275
self.emit("failed:", 0)
1276+
self.emit("state->recursion_depth--;", 1)
12761277
self.emit("Py_XDECREF(value);", 1)
12771278
self.emit("Py_XDECREF(result);", 1)
12781279
self.emit("return NULL;", 1)

Python/Python-ast.c

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)