[issue22035] Fatal error in dbm.gdbm

Serhiy Storchaka report at bugs.python.org
Wed Apr 1 10:39:57 CEST 2015


Serhiy Storchaka added the comment:

The patch for issue3999 was rejected because Python internal state may be corrupted when the SIGSEGV signal is raised. This is not the case of this issue. gdbm fatal function is called when Python is in consistent state. So we free to use any Python C-API. But internal state of concrete GDBM_FILE may be corrupted, so we shouldn't use it after handling fatal error. This cause a leak, but I think that a leak with an exception is better than just a crash.

May be different type of exception should be raised. May be we need FatalError that inherits from BaseException.

Other external libraries used by the stdlib also can crash, and perhaps crashes can be converted to exceptions. This issue is only first in the series.

----------

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


More information about the Python-bugs-list mailing list