Author serhiy.storchaka
Recipients serhiy.storchaka
Date 2014-07-22.10:20:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1406024440.03.0.44171364302.issue22035@psf.upfronthosting.co.za>
In-reply-to
Content
It is possible to crash Python by breaking opened gdbm database.

>>> import _gdbm as dbm
>>> db = dbm.open('x.db', 'n')
>>> open('x.db', 'wb').close()
>>> db[b'a'] = b'b'
gdbm fatal: read error

Proposed patch tries to convert fatal gdbm into regular exception or in Python fatal error (which at least produces traceback).

>>> import _gdbm as dbm
>>> db = dbm.open('x.db', 'n')
>>> open('x.db', 'wb').close()
>>> db[b'a'] = b'b'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
_gdbm.error: gdbm fatal: read error
History
Date User Action Args
2014-07-22 10:20:40serhiy.storchakasetrecipients: + serhiy.storchaka
2014-07-22 10:20:40serhiy.storchakasetmessageid: <1406024440.03.0.44171364302.issue22035@psf.upfronthosting.co.za>
2014-07-22 10:20:39serhiy.storchakalinkissue22035 messages
2014-07-22 10:20:39serhiy.storchakacreate