Skip to content
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

bpo-44396: Update multi-line-start location when reallocating tokenizer buffers #26676

Merged
merged 1 commit into from
Jun 12, 2021

Conversation

pablogsal
Copy link
Member

@pablogsal pablogsal commented Jun 11, 2021

https://bugs.python.org/issue44396

Automerge-Triggered-By: GH:pablogsal

@isidentical
Copy link
Sponsor Member

Should we also check whether multiline_start is NULL in

if (c == EOF || (quote_size == 1 && c == '\n')) {

@pablogsal
Copy link
Member Author

Should we also check whether multiline_start is NULL in

Hummm...why you think that is necessary? How can that happen?

@isidentical
Copy link
Sponsor Member

If I am not missing anything, according to this (on your branch) when the tok->multi_line_start - tok->buf < 0, then multi_line_start becomes NULL.
https://github.com/python/cpython/blob/304ca6ddb0591405ca422b5442306b59b157e2ca/Parser/tokenizer.c#L388

Copy link
Sponsor 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, thanks!

@miss-islington
Copy link
Contributor

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

@miss-islington miss-islington merged commit a342cc5 into python:main Jun 12, 2021
@miss-islington
Copy link
Contributor

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

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

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 12, 2021
…er buffers (pythonGH-26676)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit a342cc5)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
@pablogsal pablogsal deleted the bpo-44396 branch June 12, 2021 17:54
pablogsal pushed a commit that referenced this pull request Jun 12, 2021
…er buffers (GH-26676) (GH-26695)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit a342cc5)
jdevries3133 pushed a commit to jdevries3133/cpython that referenced this pull request Jun 19, 2021
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.

5 participants