This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: PyObject_Call called with an exception set while displaying a traceback
Type: crash Stage:
Components: Interpreter Core Versions: Python 3.5
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, vstinner, xdegaye
Priority: normal Keywords: patch

Created on 2014-10-29 21:26 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
traceback.patch xdegaye, 2014-10-29 21:26 review
Messages (4)
msg230247 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2014-10-29 21:26
To reproduce the crash run the following two-lines script and, at the fisrt (Pdb) prompt, remove the last line of this script (and the following empty lines if any):

import pdb; pdb.set_trace()
x = 1

then issue the 'quit' pdb command. This will cause an assert:

python: Objects/abstract.c:2079: PyObject_Call: Assertion `!PyErr_Occurred()' failed.
Aborted (core dumped)

A patch is attached.
msg230249 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2014-10-29 21:29
Looks similar to the problem fixed at changeset 298d98486794 by Victor Stinner.
msg230255 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2014-10-30 09:19
New changeset 9dddc95ef31e by Victor Stinner in branch '3.4':
Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if

New changeset f4f5b942e5e0 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if
msg230256 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2014-10-30 09:21
Thanks for the report and the patch. It was not easy to reproduce the issue, but I reproduced the assertion error. I'm not sure that it's useful to add an unit test.
Date User Action Args
2022-04-11 14:58:09adminsetgithub: 66951
2014-10-30 09:21:27vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg230256
2014-10-30 09:19:10python-devsetnosy: + python-dev
messages: + msg230255
2014-10-29 21:29:33xdegayesetnosy: + vstinner
messages: + msg230249
2014-10-29 21:26:09xdegayecreate