[New-bugs-announce] [issue30817] Abort in PyErr_PrintEx() when no memory

Xavier de Gaye report at bugs.python.org
Fri Jun 30 10:19:31 EDT 2017


New submission from Xavier de Gaye:

To reproduce the abort (the set_nomemory() function is being added to _testcapi in issue 30695):

$ ./python memerr.py
python: Objects/call.c:89: _PyObject_FastCallDict: Assertion `!PyErr_Occurred()' failed.
Aborted (core dumped)

The corresponding backtrace:

#0  0x00007ffff7131670 in raise () from /usr/lib/libc.so.6
#1  0x00007ffff7132d00 in abort () from /usr/lib/libc.so.6
#2  0x00007ffff712a45a in __assert_fail_base () from /usr/lib/libc.so.6
#3  0x00007ffff712a4d2 in __assert_fail () from /usr/lib/libc.so.6
#4  0x00000000004628ce in _PyObject_FastCallDict (
    callable=<built-in method excepthook of module object at remote 0x7ffff70ab8d8>,
    args=args at entry=0x7fffffffe330, nargs=nargs at entry=3, kwargs=kwargs at entry=0x0)
    at Objects/call.c:89
#5  0x0000000000426004 in PyErr_PrintEx (set_sys_last_vars=set_sys_last_vars at entry=1)
    at Python/pythonrun.c:641
#6  0x00000000004263ac in PyErr_Print () at Python/pythonrun.c:510
#7  0x0000000000427586 in PyRun_SimpleFileExFlags (fp=fp at entry=0x987620, filename=<optimized out>,
    filename at entry=0x7ffff6febcd0 "memerr.py", closeit=closeit at entry=1,
    flags=flags at entry=0x7fffffffe4cc) at Python/pythonrun.c:403
#8  0x0000000000427673 in PyRun_AnyFileExFlags (fp=fp at entry=0x987620,
    filename=0x7ffff6febcd0 "memerr.py", closeit=closeit at entry=1, flags=flags at entry=0x7fffffffe4cc)
    at Python/pythonrun.c:82
#9  0x0000000000437217 in run_file (fp=fp at entry=0x987620, filename=0x91a190 L"memerr.py",
    p_cf=p_cf at entry=0x7fffffffe4cc) at Modules/main.c:341
#10 0x0000000000437bae in Py_Main (argc=argc at entry=2, argv=argv at entry=0x918020)
    at Modules/main.c:901
#11 0x000000000041d7fa in main (argc=2, argv=0x7fffffffe6c8) at ./Programs/python.c:102

----------
components: Interpreter Core
files: memerr.py
messages: 297408
nosy: xdegaye
priority: normal
severity: normal
status: open
title: Abort in PyErr_PrintEx() when no memory
type: crash
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46982/memerr.py

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30817>
_______________________________________


More information about the New-bugs-announce mailing list