[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye
Change by Xavier de Gaye : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset d5d79545b73110b2f4c2b66d150409514e2ca8e0 by xdegaye in branch '3.6': [3.6] bpo-30817: Fix PyErr_PrintEx() when no memory (GH-2526). (#4107) https://github.com/python/cpython/commit/d5d79545b73110b2f4c2b66d150409514e2ca8e0

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-24 Thread Xavier de Gaye
Change by Xavier de Gaye : -- pull_requests: +4077 ___ Python tracker ___ ___

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-23 Thread Xavier de Gaye
Xavier de Gaye added the comment: New changeset 66caacf2f0d6213b049a3097556e28e30440b900 by xdegaye in branch 'master': bpo-30817: Fix PyErr_PrintEx() when no memory (#2526) https://github.com/python/cpython/commit/66caacf2f0d6213b049a3097556e28e30440b900 --

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-23 Thread Xavier de Gaye
Xavier de Gaye added the comment: Removing 2.7 as the problem cannot be reproduced here. PyEval_CallObjectWithKeywords() does not assert on PyErr_Occurred(). -- versions: -Python 2.7 ___ Python tracker

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-10-23 Thread Xavier de Gaye
Change by Xavier de Gaye : -- stage: -> patch review versions: -Python 3.5 ___ Python tracker ___

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I tried to set last_type, last_value and last_traceback to None at startup, and this also fixes a crash. But this changes behavior (these attributes became set), and deleting them doesn't guaranties that following setting will be successful, especially with

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-07-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: There are just 6 cases left where the return code of _PySys_SetObjectId() is ignored: Python/pylifecycle.c|689 col 5| _PySys_SetObjectId(_stderr, pstderr); Python/pylifecycle.c|1211 col 9| _PySys_SetObjectId(_stderr, pstderr); Python/pylifecycle.c|1657 col 5|

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-07-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Is it good to ignore errors of setting sys attributes? Can we prevent these errors? -- nosy: +serhiy.storchaka ___ Python tracker

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-07-01 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- pull_requests: +2591 ___ Python tracker ___ ___

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-06-30 Thread STINNER Victor
STINNER Victor added the comment: pyerr_printex.patch LGTM, please convert it to a GitHub PR. -- nosy: +haypo ___ Python tracker ___

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-06-30 Thread Xavier de Gaye
Xavier de Gaye added the comment: 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

[issue30817] Abort in PyErr_PrintEx() when no memory

2017-06-30 Thread Xavier de Gaye
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