Message297411
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")
============================= |
|
Date |
User |
Action |
Args |
2017-06-30 14:21:16 | xdegaye | set | recipients:
+ xdegaye |
2017-06-30 14:21:16 | xdegaye | set | messageid: <1498832476.19.0.0588949247792.issue30817@psf.upfronthosting.co.za> |
2017-06-30 14:21:16 | xdegaye | link | issue30817 messages |
2017-06-30 14:21:15 | xdegaye | create | |
|