Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

GH-91742: Fix pdb crash after jump#94171

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
markshannon merged 2 commits intopython:mainfromkumaraditya303:gh-91742
Jun 23, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletionsLib/test/test_pdb.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1363,7 +1363,50 @@ def test_pdb_issue_43318():
4
"""

def test_pdb_issue_gh_91742():
"""See GH-91742

>>> def test_function():
... __author__ = "pi"
... __version__ = "3.14"
...
... def about():
... '''About'''
... print(f"Author: {__author__!r}",
... f"Version: {__version__!r}",
... sep=" ")
...
... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
... about()


>>> reset_Breakpoint()
>>> with PdbTestInput([ # doctest: +NORMALIZE_WHITESPACE
... 'step',
... 'next',
... 'next',
... 'jump 5',
... 'continue'
... ]):
... test_function()
> <doctest test.test_pdb.test_pdb_issue_gh_91742[0]>(12)test_function()
-> about()
(Pdb) step
--Call--
> <doctest test.test_pdb.test_pdb_issue_gh_91742[0]>(5)about()
-> def about():
(Pdb) next
> <doctest test.test_pdb.test_pdb_issue_gh_91742[0]>(7)about()
-> print(f"Author: {__author__!r}",
(Pdb) next
> <doctest test.test_pdb.test_pdb_issue_gh_91742[0]>(8)about()
-> f"Version: {__version__!r}",
(Pdb) jump 5
> <doctest test.test_pdb.test_pdb_issue_gh_91742[0]>(5)about()
-> def about():
(Pdb) continue
Author: 'pi' Version: '3.14'
"""
@support.requires_subprocess()
class PdbTestCase(unittest.TestCase):
def tearDown(self):
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
Fix :mod:`pdb` crash after jump caused by a null pointer dereference. Patch by Kumar Aditya.
2 changes: 1 addition & 1 deletionObjects/frameobject.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -418,7 +418,7 @@ static void
frame_stack_pop(PyFrameObject *f)
{
PyObject *v = _PyFrame_StackPop(f->f_frame);
Py_DECREF(v);
Py_XDECREF(v);
}

static PyFrameState
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp