Skip to content

[3.10] GH-93964: Harden overflow checks before _PyBytes_Resize in compile.c #94045

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 6 commits into from
Jun 22, 2022

Conversation

sweeneyde
Copy link
Member

@sweeneyde sweeneyde force-pushed the 310_compile_overflow branch from 25d9683 to 9adc696 Compare June 21, 2022 03:27
@sweeneyde
Copy link
Member Author

I confirmed that this successfully raises instead of crashing:

>>> import english_data  # from the issue
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError

Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

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

A couple of minor issues, otherwise LGTM.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@sweeneyde
Copy link
Member Author

Now it's:

>>> import english_data
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: line number table is too long

I have made the requested changes; please review again

@bedevere-bot
Copy link

Thanks for making the requested changes!

@markshannon: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from markshannon June 21, 2022 18:12
@markshannon
Copy link
Member

Thanks.

@markshannon markshannon merged commit 08069ba into python:3.10 Jun 22, 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.

3 participants