[issue3885] errors on _bsddb creation and dealloc

STINNER Victor report at bugs.python.org
Tue Sep 16 23:09:49 CEST 2008


New submission from STINNER Victor <victor.stinner at haypocalc.com>:

I found two differents bugs using Fusil the fuzzer.

(1) On db_env_create() error in newDBEnvObject(), self->db_env is not 
set and so use of this pointer may crashs.

(2) DBEnv_dealloc() may raise an exception (DBEnv_close_internal() 
calls makeDBError()) but the garbage collector dislike exceptions!

Example of (2):
----
$ python
>>> import gc, _bsddb; env=_bsddb.DBEnv(3); del env
>>> gc.collect(); gc.collect()
Exception bsddb.db.DBNoServerError: (-30992, 'DB_NOSERVER: Fatal 
error, no RPC server -- No Berkeley DB RPC server environment') 
in 'garbage collection' ignored
Fatal Python error: unexpected exception during garbage collection
----

----------
components: Library (Lib)
files: _bsddb.patch
keywords: patch
messages: 73312
nosy: haypo
severity: normal
status: open
title: errors on _bsddb creation and dealloc
versions: Python 2.6
Added file: http://bugs.python.org/file11505/_bsddb.patch

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


More information about the Python-bugs-list mailing list