Perfect your code
With built-in code review tools, GitHub makes it easy to raise the quality bar before you ship. Join the 40 million developers who've merged over 200 million pull requests.
Sign up for free See pricing for teams and enterprisesbpo-32758: warn that a couple ast functions can crash the interpreter #5960
Conversation
…eter
This comment has been minimized.
This comment has been minimized.
Got approval for the wording from @serhiy-storchaka in the issue itself, but he also pointed out that there are implicit uses of the troublesome functions in various other places, so the comment needs to spread out a bit more before this PR can get merged. |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Mar 9, 2018
Thanks @brettcannon for the PR |
…the interpreter (pythonGH-5960) (cherry picked from commit 7a7f100) Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Mar 9, 2018
GH-6041 is a backport of this pull request to the 3.7 branch. |
This comment has been minimized.
This comment has been minimized.
miss-islington
commented
Mar 9, 2018
Sorry, @brettcannon, I could not cleanly backport this to |
…the interpreter (pythonGH-5960) (cherry picked from commit 7a7f100) Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Mar 9, 2018
GH-6042 is a backport of this pull request to the 3.6 branch. |
…the interpreter (pythonGH-5960)
…the interpreter (pythonGH-5960)
…the interpreter (pythonGH-5960) (cherry picked from commit 7a7f100) Co-authored-by: Brett Cannon <brettcannon@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Oct 3, 2019
GH-16565 is a backport of this pull request to the 2.7 branch. |
brettcannon commentedMar 2, 2018
•
edited by bedevere-bot
Both
ast.parse()
andast.literal_eval()
can trigger a segfault with the appropriate string input due to the recursion depth limit of the AST compiler.https://bugs.python.org/issue32758