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

gh-107450: Raise OverflowError when parser column offset overflows #110754

Merged

Conversation

lysnikolaou
Copy link
Contributor

@lysnikolaou lysnikolaou commented Oct 12, 2023

@lysnikolaou
Copy link
Contributor Author

Should we backport this?

@pablogsal
Copy link
Member

I think it makes sense to backport. How crazy is to add a test case?

@lysnikolaou
Copy link
Contributor Author

I think it makes sense to backport. How crazy is to add a test case?

Added.

@lysnikolaou lysnikolaou added needs backport to 3.11 only security fixes needs backport to 3.12 bug and security fixes labels Oct 12, 2023
@lysnikolaou lysnikolaou changed the title gh-107450: Raise MemoryError when parser column offset overflows gh-107450: Raise OverflowError when parser column offset overflows Oct 12, 2023
@lysnikolaou lysnikolaou enabled auto-merge (squash) October 12, 2023 09:15
@lysnikolaou lysnikolaou merged commit fb7843e into python:main Oct 12, 2023
26 of 27 checks passed
@miss-islington
Copy link
Contributor

Thanks @lysnikolaou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 12, 2023
…ows (pythonGH-110754)

(cherry picked from commit fb7843e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 12, 2023

GH-110762 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label Oct 12, 2023
@bedevere-app
Copy link

bedevere-app bot commented Oct 12, 2023

GH-110763 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.11 only security fixes label Oct 12, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 12, 2023
…ows (pythonGH-110754)

(cherry picked from commit fb7843e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
lysnikolaou added a commit that referenced this pull request Oct 12, 2023
…lows (GH-110754) (#110763)

(cherry picked from commit fb7843e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
lysnikolaou added a commit that referenced this pull request Oct 12, 2023
…lows (GH-110754) (#110762)

(cherry picked from commit fb7843e)

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
@colesbury
Copy link
Contributor

@lysnikolaou the testMemoryErrorBigSource seems to fail on 32-bit Windows

@vstinner
Copy link
Member

Right, the test fails on 32-bit, at least on GHA Windows x86 CI:

FAIL: testMemoryErrorBigSource (test.test_exceptions.ExceptionTests.testMemoryErrorBigSource)
----------------------------------------------------------------------
OverflowError: cannot fit 'int' into an index-sized integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\a\cpython\cpython\Lib\test\test_exceptions.py", line 322, in testMemoryErrorBigSource
    with self.assertRaisesRegex(OverflowError, "column offset overflow"):
AssertionError: "column offset overflow" does not match "cannot fit 'int' into an index-sized integer"

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

Successfully merging this pull request may close these issues.

5 participants