Visitar URL original
bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser by pablogsal · Pull Request #30177 · python/cpython · GitHub
The Wayback Machine - https://web.archive.org/web/20250420081230/https://github.com/python/cpython/pull/30177
Skip to content

bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser #30177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 20, 2021

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Dec 18, 2021 •

@ned-deily ned-deily changed the title bpo-6110: Add a recursion check to avoid stack overflow in the PEG parser bpo-46110: Add a recursion check to avoid stack overflow in the PEG parser Dec 18, 2021
Copy link
Member

@isidentical isidentical left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
@cmcmarrow
Copy link

thanks for the PR!

@pablogsal pablogsal marked this pull request as ready for review December 19, 2021 00:31
@pablogsal pablogsal marked this pull request as draft December 19, 2021 01:22
@pablogsal
Copy link
Member Author

pablogsal commented Dec 19, 2021 •

Unfortunately, I am not still convinced about this since 1700 frames are reached easily with 60 or so parentheses while currently the maximum allowed parentheses is reached at 5560 frames.

@pablogsal pablogsal marked this pull request as ready for review December 19, 2021 01:33
@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit a050033f543db8fa9ed36ee81798fcbeb72f7116 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@python python deleted a comment from bedevere-bot Dec 19, 2021
@pablogsal pablogsal added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @pablogsal for commit 5270ebc 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Dec 19, 2021
@pablogsal pablogsal merged commit e9898bf into python:main Dec 20, 2021
@pablogsal pablogsal deleted the bpo-46110 branch December 20, 2021 15:43
@pablogsal pablogsal added needs backport to 3.9 only security fixes needs backport to 3.10 only security fixes labels Dec 20, 2021
@miss-islington
Copy link
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry @pablogsal, I had trouble checking out the 3.10 backport branch.
Please backport using cherry_picker on command line.
cherry_picker e9898bf153d26059261ffef11f7643ae991e2a4c 3.10

@miss-islington
Copy link
Contributor

Sorry, @pablogsal, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker e9898bf153d26059261ffef11f7643ae991e2a4c 3.9

pablogsal added a commit to pablogsal/cpython that referenced this pull request Dec 20, 2021
…e PEG parser (pythonGH-30177)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
@bedevere-bot
Copy link

GH-30214 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Dec 20, 2021
@bedevere-bot
Copy link

GH-30215 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Dec 20, 2021
pablogsal added a commit that referenced this pull request Dec 20, 2021
…e PEG parser (GH-30177) (GH-30214)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit to pablogsal/cpython that referenced this pull request Dec 20, 2021
… PEG parser (pythonGH-30177)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this pull request Dec 20, 2021
… PEG parser (GH-30177) (#30215)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>.
(cherry picked from commit e9898bf)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
brandtbucher pushed a commit to brandtbucher/cpython that referenced this pull request Dec 27, 2021
…arser (pythonGH-30177)

Co-authored-by: Batuhan Taskaya <isidentical@gmail.com>
pablogsal added a commit that referenced this pull request Jan 3, 2022
pablogsal added a commit that referenced this pull request Jan 3, 2022
…he PEG parser (GH-30177)" (GH-30363)

This reverts commit e9898bf temporarily as we want to confirm if this commit is the cause of a slowdown at startup time.
pablogsal added a commit that referenced this pull request Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants