bpo-39091: Fix segfault when Exception constructor returns non-exception for gen.throw#17658
Conversation
|
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA). CLA MissingOur records indicate the following people have not signed the CLA: For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. If you have recently signed the CLA, please wait at least one business day You can check yourself to see if the CLA has been received. Thanks again for the contribution, we look forward to reviewing it! |
ad65177 to
08e42d6
Compare
|
|
3cb4685 to
a2a7e43
Compare
a2a7e43 to
bfa9b85
Compare
|
Any updates on this? |
bfa9b85 to
335a292
Compare
corona10
left a comment
There was a problem hiding this comment.
@serhiy-storchaka @vstinner
This PR is waiting for review for a long time.
Can you please take a look?
Codecov Report
@@ Coverage Diff @@
## master #17658 +/- ##
===========================================
+ Coverage 82.11% 83.20% +1.08%
===========================================
Files 1956 1571 -385
Lines 589364 414752 -174612
Branches 44457 44457
===========================================
- Hits 483963 345084 -138879
+ Misses 95748 60021 -35727
+ Partials 9653 9647 -6
Continue to review full report at Codecov.
|
|
ping @serhiy-storchaka @vstinner this PR needs to be merged. |
|
@benjaminp: Please replace |
|
Thanks @coolreader18 for the PR, and @benjaminp for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.8, 3.9. |
|
GH-27572 is a backport of this pull request to the 3.10 branch. |
|
GH-27573 is a backport of this pull request to the 3.9 branch. |
|
Sorry, @coolreader18 and @benjaminp, I could not cleanly backport this to |
…-exception for gen.throw. (pythonGH-17658) Co-authored-by: Benjamin Peterson <benjamin@python.org> (cherry picked from commit 83ca46b) Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
…-exception for gen.throw. (pythonGH-17658) Co-authored-by: Benjamin Peterson <benjamin@python.org> (cherry picked from commit 83ca46b) Co-authored-by: Noah <33094578+coolreader18@users.noreply.github.com>
|
Thanks for the fix! |
|
Took 2 years but it's finally getting fixed! 😂 |
|
Better late than never. |
I added a type check in
_PyErr_CreateExceptionas @serhiy-storchaka suggested.I'm not sure if I should replace the check in
do_raiseinceval.cwith a call to_PyErr_CreateExceptionsomehow, as it's effectively the same functionality?https://bugs.python.org/issue39091