Skip to content

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

Merged
lysnikolaou merged 3 commits into
python:mainfrom
lysnikolaou:int-overflow-parser-long-string-exec
Oct 12, 2023
Merged

gh-107450: Raise OverflowError when parser column offset overflows#110754
lysnikolaou merged 3 commits into
python:mainfrom
lysnikolaou:int-overflow-parser-long-string-exec

Conversation

@lysnikolaou

@lysnikolaoulysnikolaou commented Oct 12, 2023

Copy link
Copy Markdown
Member

@lysnikolaou

Copy link
Copy Markdown
MemberAuthor

Should we backport this?

@pablogsal

Copy link
Copy Markdown
Member

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

@lysnikolaou

Copy link
Copy Markdown
MemberAuthor

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

Added.

@lysnikolaoulysnikolaou added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 12, 2023
@lysnikolaoulysnikolaou changed the title gh-107450: Raise MemoryError when parser column offset overflowsgh-107450: Raise OverflowError when parser column offset overflowsOct 12, 2023
@lysnikolaou
lysnikolaou enabled auto-merge (squash) October 12, 2023 09:15
@lysnikolaou
lysnikolaou merged commit fb7843e into python:mainOct 12, 2023
@miss-islington

Copy link
Copy Markdown
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
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.12 only security fixes label Oct 12, 2023
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot 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
Copy Markdown
Contributor

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

@vstinner

Copy link
Copy Markdown
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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@lysnikolaou@pablogsal@miss-islington@colesbury@vstinner