[New-bugs-announce] [issue28994] Misc fixes and cleanups in error handling C code

Serhiy Storchaka report at bugs.python.org
Fri Dec 16 18:38:16 EST 2016


New submission from Serhiy Storchaka:

Proposed patch makes few minor changes related to handling errors in C.

* Fixed possible NULL dereference in PyErr_NormalizeException().

* Fixed error checking in atexit._run_exitfuncs().

* Fixed possible memory leaks in _Py_FatalError_PrintExc().

* PyErr_NormalizeException() no longer recursive.

* If an error is occurred during handling other error, the original exception is chained as the __contex__ attribute to the new exception instead of just be dropped.

* PyTraceBack_Print() no longer fails OverflowError if tracebacklimit is very large negative or positive value.

* ctype error message now include the name of the initial exception instead of the repr of its class.

* Py_XDECREFs is replaced with Py_DECREFs if this is safe.

* Added few asserts.

* Other minor cleanups.

----------
components: Interpreter Core
files: errors.diff
keywords: patch
messages: 283451
nosy: serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Misc fixes and cleanups in error handling C code
type: behavior
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45932/errors.diff

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


More information about the New-bugs-announce mailing list