This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Segmentantion Fault in bsddb
Type: Stage:
Components: Library (Lib) Versions: Python 2.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: niemeyer Nosy List: niemeyer, psycao
Priority: normal Keywords:

Created on 2004-01-20 12:28 by psycao, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg19726 - (view) Author: Rafael Ugolini (psycao) Date: 2004-01-20 12:28
Hi , i was using bsddb module and i got a Segmentantion
Fault....

psyc@barbaric:~$ python
[GCC 3.3.3 20031229] (prerelease) (Debian) on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>> import bsddb
>>> x = bsddb.rnopen('lala.db')
>>> x[None] = 'anything'
Segmentation fault

The problem is in rnopen , when you put a None key you
got a segfault.
i little patch is edit __init__.py in line 120 put an if.

    def __setitem__(self, key, value):
        self._checkOpen()
        if key != None:
            self.db[key] = value
msg19727 - (view) Author: Gustavo Niemeyer (niemeyer) * (Python committer) Date: 2004-01-20 15:25
Logged In: YES 
user_id=7887

Notice that None keys work fine for other kinds of database
(hash, etc). The correct fix in this case is to disallow
None keys when using Queue/Recno database types, during the
key conversion routine, inside the _bsddb.c module.

Fixed in Modules/_bsddb.c: 1.27
History
Date User Action Args
2022-04-11 14:56:02adminsetgithub: 39836
2004-01-20 12:28:56psycaocreate