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.

作者 xdegaye
收信人 xdegaye
日期 2017-06-30.14:21:15
SpamBayes Score -1.0
Marked as misclassified
Message-id <1498832476.19.0.0588949247792.issue30817@psf.upfronthosting.co.za>
In-reply-to
内容
With pyerr_printex.patch we get the following correct results (rc=120 is set by Py_Main() after Py_FinalizeEx() returns with an error):

$ ./python memerr.py 5 12
set_nomemory(0, 5)
result = _PythonRunResult(rc=1, out=b'', err=b'MemoryError\n\nDuring handling of the above exception, another exception occurred:\n\nMemoryError')
=============================
set_nomemory(0, 6)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nMemoryError\n\nDuring handling of the above exception, another exception occurred:\n\nMemoryError')
=============================
set_nomemory(0, 7)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nMemoryError\n\nDuring handling of the above exception, another exception occurred:\n\nMemoryError')
=============================
set_nomemory(0, 8)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nobject  : MemoryError()\ntype    : MemoryError\nrefcount: 1\naddress : 0x7f7ae1be3eb0\nlost sys.stderr')
=============================
set_nomemory(0, 9)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nobject  : \ntype    : MemoryError\nrefcount: 1\naddress : 0x7f8aead15eb0\nlost sys.stderr')
=============================
set_nomemory(0, 10)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nobject  : \ntype    : MemoryError\nrefcount: 1\naddress : 0x7f7b489d1eb0\nlost sys.stderr')
=============================
set_nomemory(0, 11)
result = _PythonRunResult(rc=1, out=b'', err=b'sys.excepthook is missing\nobject  : \ntype    : MemoryError\nrefcount: 1\naddress : 0x7ff97365eeb0\nlost sys.stderr')
=============================
set_nomemory(0, 12)
result = _PythonRunResult(rc=120, out=b'', err=b"sys.excepthook is missing\nobject  : \ntype    : MemoryError\nrefcount: 1\naddress : 0x7f559c9e0eb0\nlost sys.stderr\nException ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>\nMemoryError")
=============================
历史
日期 用户 动作 参数
2017-06-30 14:21:16xdegaye修改recipients: + xdegaye
2017-06-30 14:21:16xdegaye修改messageid: <1498832476.19.0.0588949247792.issue30817@psf.upfronthosting.co.za>
2017-06-30 14:21:16xdegaye链接issue30817 messages
2017-06-30 14:21:15xdegaye创建