forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-94215: Fix reference count issue in exception_unwind
Zero-cost exception handling did not take ``frame_setlineno()`` into account. It can pop off stacks. This can lead to a crash. Exception unwinding now re-calculates the stack pointer. Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
- Loading branch information
1 parent
7169766
commit 968d0ba
Showing
3 changed files
with
10 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
4 changes: 4 additions & 0 deletions
4
Misc/NEWS.d/next/Core and Builtins/2022-07-07-17-07-00.gh-issue-94215.cXltGH.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Fix a reference counting bug in exception unwinding code for zero-cost | ||
exception handling. The code did not take into account that | ||
``frame_setlineno()`` can pop off stacks, too. | ||
Patch by Irit Katriel and Christian Heimes. |
This file contains 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