classification
Title: PyObject_Call called with an exception set while displaying a traceback
Type: crash Stage:
Components: Interpreter Core Versions: Python 3.5
process
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 2014-10-30 09:21 by vstinner. This issue is now closed.

Files
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
https://hg.python.org/cpython/rev/9dddc95ef31e

New changeset f4f5b942e5e0 by Victor Stinner in branch 'default':
(Merge 3.4) Issue #22762: Fix _Py_DisplaySourceLine(), clear the exception if
https://hg.python.org/cpython/rev/f4f5b942e5e0
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.
History
Date User Action Args
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