GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-128961: Fix exhausted array iterator crash in `__setstate__` by tom-pytel · Pull Request #128962 · python/cpython

Conversation

@tom-pytel

@tom-pytel tom-pytel commented Jan 17, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Simple fix for this segfault.

  • Issue: array iterator segfault on __setstate__() when exhausted #128961

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@tom-pytel
pythongh-128961: fix array iterator segfault on __setstate__
7831074
@bedevere-app bedevere-app Bot mentioned this pull request Jan 17, 2025
array iterator segfault on __setstate__() when exhausted #128961
Closed
@bedevere-app

bedevere-app Bot commented Jan 17, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Jan 17, 2025
@bedevere-app

bedevere-app Bot commented Jan 17, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tom-pytel and others added 2 commits January 17, 2025 16:32
@tom-pytel
oops
3975683
@blurb-it
📜🤖 Added by blurb_it.
3f9bd66
sobolevn
sobolevn reviewed Jan 17, 2025
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

style nit :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Modules/arraymodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Modules/arraymodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tom-pytel
nit picked
e7f00dc
tomasr8
tomasr8 reviewed Jan 17, 2025
View reviewed changes
Comment thread Misc/NEWS.d/next/Library/2025-01-17-21-33-11.gh-issue-128961.XwvyIZ.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tom-pytel
upgrade words
d6610b7
tomasr8
tomasr8 approved these changes Jan 17, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Jan 17, 2025
@erlend-aasland

erlend-aasland commented Jan 17, 2025

Copy link
Copy Markdown
Contributor

Thanks, @tom-pytel!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland
erlend-aasland reviewed Jan 17, 2025
View reviewed changes
Comment thread Lib/test/test_array.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tom-pytel
test raise StopIteration after pythongh-128961
8eab735
erlend-aasland
erlend-aasland reviewed Jan 17, 2025
View reviewed changes
Comment thread Lib/test/test_array.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tom-pytel
requested tweaks
2accb87
erlend-aasland
erlend-aasland approved these changes Jan 18, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jan 18, 2025
@erlend-aasland erlend-aasland added needs backport to 3.12 only security fixes needs backport to 3.13 only security fixes labels Jan 18, 2025
picnixz
picnixz reviewed Jan 18, 2025
View reviewed changes
Comment thread Modules/arraymodule.c Resolved

Uh oh!

There was an error while loading. Please reload this page.

picnixz
picnixz approved these changes Jan 18, 2025
View reviewed changes
@erlend-aasland

erlend-aasland commented Jan 18, 2025

Copy link
Copy Markdown
Contributor

@sobolevn's PEP-7 remarks were addressed with e7f00dc. Looks like we're good to go. Thanks a lot, @tom-pytel!

picnixz reacted with hooray emoji
All reactions
  • 🎉 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland changed the title gh-128961: fix exhausted array iterator crash on __setstate__ gh-128961: Fix exhausted array iterator crash in __setstate__ Jan 18, 2025
@erlend-aasland
erlend-aasland merged commit 4dade05 into python:main Jan 18, 2025
@miss-islington-app

This comment was marked as outdated.

Sign in to view
@bedevere-app bedevere-app Bot removed the awaiting merge label Jan 18, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 18, 2025
@tom-pytel @miss-islington
pythongh-128961: Fix exhausted array iterator crash in __setstate__() (…
29cbdab
…pythonGH-128962)

(cherry picked from commit 4dade05)

Co-authored-by: Tomasz Pytel <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 18, 2025
@tom-pytel @miss-islington
pythongh-128961: Fix exhausted array iterator crash in __setstate__() (…
bf59715
…pythonGH-128962)

(cherry picked from commit 4dade05)

Co-authored-by: Tomasz Pytel <[email protected]>
@bedevere-app

bedevere-app Bot commented Jan 18, 2025

Copy link
Copy Markdown

GH-128976 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jan 18, 2025
@bedevere-app

bedevere-app Bot commented Jan 18, 2025

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 18, 2025
erlend-aasland pushed a commit that referenced this pull request Jan 18, 2025
@miss-islington @tom-pytel
[3.12] gh-128961: Fix exhausted array iterator crash in __setstate__() (
405f6d7
GH-128962) (#128977)

(cherry picked from commit 4dade05)

Co-authored-by: Tomasz Pytel <[email protected]>
erlend-aasland pushed a commit that referenced this pull request Jan 18, 2025
@miss-islington @tom-pytel
[3.13] gh-128961: Fix exhausted array iterator crash in __setstate__() (
c75894a
GH-128962) (#128976)

(cherry picked from commit 4dade05)

Co-authored-by: Tomasz Pytel <[email protected]>
@bedevere-bot

This comment was marked as off-topic.

Sign in to view
@ZeroIntensity

ZeroIntensity commented Jan 18, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@tom-pytel Is this your first merged PR? If so, congrats! (The buildbot failure is unrelated, FWIW.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tom-pytel

tom-pytel commented Jan 18, 2025

Copy link
Copy Markdown
Contributor Author

@tom-pytel Is this your first merged PR? If so, congrats! (The buildbot failure is unrelated, FWIW.)

Yup, first official PR so thank you. I did python internals at at a company a couple years back so not my first cpython rodeo, but free-threading and the quickening/specialization stuff is new.

erlend-aasland reacted with hooray emoji ZeroIntensity, tomasr8, and erlend-aasland reacted with rocket emoji
All reactions
  • 🎉 1 reaction
  • 🚀 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this pull request Jan 21, 2025
@tom-pytel @srinivasreddy
pythongh-128961: Fix exhausted array iterator crash in __setstate__() (…
e0f3786
…python#128962)
@tom-pytel
tom-pytel deleted the fix-issue-128961 branch March 31, 2025 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn left review comments
@tomasr8 tomasr8 tomasr8 approved these changes
@picnixz picnixz picnixz approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@tom-pytel @erlend-aasland @bedevere-bot @ZeroIntensity @sobolevn @tomasr8 @picnixz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.