Skip to content

gh-160781: Only test BytesIO write overflow on the C implementation - #160903

Merged
StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:fix-io-tests
Oct 29, 2026
Merged

StanFromIreland merged 1 commit into
python:mainfrom
StanFromIreland:fix-io-tests

Conversation

@StanFromIreland

Copy link
Copy Markdown
Member

This fixes the failures reported in #160783 (comment). The write test added we added ran against _pyio.BytesIO too, and on 32-bit platforms its padding resize() (to about 2 GiB!) can succeed before the one-byte slice assignment fails, leaving the buffer enlarged. The following getvalue() then raised OverflowError from bytes(self._buffer). Let's move the test into CBytesIOTest.

@StanFromIreland

Copy link
Copy Markdown
Member Author

!buildbot x86.Debian

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @StanFromIreland for commit 14f8007 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F160903%2Fmerge

The command will test the builders whose names match following regular expression: x86.Debian

The builders matched are:

  • x86 Debian Non-Debug with X PR
  • x86 Debian Installed with X PR

@cmaloney cmaloney left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks for fixing the bot!

@StanFromIreland
StanFromIreland merged commit 8dbc313 into python:main Oct 29, 2026
60 checks passed
@StanFromIreland
StanFromIreland deleted the fix-io-tests branch October 29, 2026 16:58
@StanFromIreland StanFromIreland added needs backport to 3.14 bugs and security fixes needs backport to 3.15 bugs and security fixes labels Oct 29, 2026
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

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

@bedevere-app

bedevere-app Bot commented Oct 29, 2026

Copy link
Copy Markdown

GH-160910 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 29, 2026
@bedevere-app

bedevere-app Bot commented Oct 29, 2026

Copy link
Copy Markdown

GH-160911 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 29, 2026
StanFromIreland added a commit that referenced this pull request Oct 29, 2026
…ation (GH-160903) (#160910)

(cherry picked from commit 8dbc313)

Co-authored-by: Stan Ulbrych <[email protected]>
StanFromIreland added a commit that referenced this pull request Oct 29, 2026
…ation (GH-160903) (#160911)

(cherry picked from commit 8dbc313)

Co-authored-by: Stan Ulbrych <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip issue skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants