Skip to content

[3.10] bpo-11105: Do not crash when compiling recursive ASTs (GH-20594) - #26521

Merged
miss-islington merged 1 commit into
python:3.10from
miss-islington:backport-f349124-3.10
Jun 3, 2021
Merged

miss-islington merged 1 commit into
python:3.10from
miss-islington:backport-f349124-3.10

Conversation

@miss-islington

@miss-islington miss-islington commented Jun 3, 2021 •

Copy link
Copy Markdown
Contributor

When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError.
(cherry picked from commit f349124)

Co-authored-by: Batuhan Taskaya batuhan@python.org

https://bugs.python.org/issue11105

When compiling an AST object with a direct / indirect reference
cycles, on the conversion phase because of exceeding amount of
calls, a segfault was raised. This patch adds recursion guards to
places for preventing user inputs to not to crash AST but instead
raise a RecursionError.
(cherry picked from commit f349124)

Co-authored-by: Batuhan Taskaya <batuhan@python.org>
@miss-islington

Copy link
Copy Markdown
Contributor Author

@isidentical and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington

Copy link
Copy Markdown
Contributor Author

@isidentical and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington

Copy link
Copy Markdown
Contributor Author

@isidentical and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington

Copy link
Copy Markdown
Contributor Author

@isidentical and @pablogsal: Status check is done, and it's a success ✅ .

@miss-islington
miss-islington merged commit 976598d into python:3.10 Jun 3, 2021
@miss-islington
miss-islington deleted the backport-f349124-3.10 branch June 3, 2021 20:27
@miss-islington

Copy link
Copy Markdown
Contributor Author

@isidentical and @pablogsal: Status check is done, and it's a pending ❌ .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants