-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
gh-126366: Fix crash if __iter__
raises an exception during yield from
#126369
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-126366: Fix crash if __iter__
raises an exception during yield from
#126369
Conversation
I don't understand how the JIT failures could be related. |
@savannahostrowski @diegorusso My JIT experts, are these known failures, or is there something wrong with my fix? |
@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 |
Thank you, Savannah! I'll update the skip list and see if that fixes it. |
…pected to the skip list.
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.
LGTM
Would it be possible to backport the test to 3.12 and 3.13? |
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. |
It's useful to check for non-regression: make sure that we don't break this code path in the future. |
Apparently, gh-126366 has two issues: one is a thread safety problem inside
list.__init__
, and then the other is that theGET_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.ChainMap
of aCounter
in threads #126366