FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-126366: Fix crash if `__iter__` raises an exception during `yield from` by ZeroIntensity · Pull Request #126369 · python/cpython · GitHub

/ cpython Public

gh-126366: Fix crash if __iter__ raises an exception during yield from - #126369

Merged
kumaraditya303 merged 5 commits into
python:mainfrom
ZeroIntensity:propagate-iter-errors
Nov 5, 2024
Merged

gh-126366: Fix crash if __iter__ raises an exception during yield from#126369
kumaraditya303 merged 5 commits into
python:mainfrom
ZeroIntensity:propagate-iter-errors

Conversation

ZeroIntensity commented Nov 3, 2024
edited
Loading

Copy link
Copy Markdown
Member

Apparently, gh-126366 has two issues: one is a thread safety problem inside list.__init__, and then the other is that the GET_YIELD_FROM_ITER instruction crashes if a non-native-generator object raises an exception in its __iter__. Since the latter only applies to 3.14, I'm splitting the fix into two PRs.

Copy link
Copy Markdown
Member Author

I don't understand how the JIT failures could be related.

Copy link
Copy Markdown
Member Author

@savannahostrowski @diegorusso My JIT experts, are these known failures, or is there something wrong with my fix?

savannahostrowski commented Nov 3, 2024
edited
Loading

Copy link
Copy Markdown
Member

@ZeroIntensity The aarch64 failures are known/expected. This is what we were discussing over Discord a couple of days back. Right now, we are waiting for this to be fixed in the aarch64 macos runners.

As for the emulated Linux failures, sometimes we do see failures here, and that's why we maintain this list of tests to skip. I will note that this test was seen recently passing in https://github.com/python/cpython/actions/runs/11647994504/job/32434030552?pr=126339).

If this PR has nothing to do with test.test_subprocess.POSIXProcessTestCase.test_vfork_used_when_expected (and I suspect it doesn't...), it may need to be added to the skip list.

Copy link
Copy Markdown
Member Author

Thank you, Savannah! I'll update the skip list and see if that fixes it.

colesbury 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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

kumaraditya303 merged commit 1371295 into python:main Nov 5, 2024

vstinner commented Nov 6, 2024

Copy link
Copy Markdown
Member

Would it be possible to backport the test to 3.12 and 3.13?

Copy link
Copy Markdown
Member Author

Maybe, but would it be all that useful? Anything that gets backported to those versions will (probably) have to go through the test on main anyway.

vstinner commented Nov 6, 2024

Copy link
Copy Markdown
Member

It's useful to check for non-regression: make sure that we don't break this code path in the future.

picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

6 participants


Back | FazBrowse Home | New Git URL