[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/FileStorage/FileStorage.py - Fixed bug that could lead to memory errors due to the use

Jim Fulton jim at zope.com
Fri Sep 5 13:56:54 EDT 2008


Log message for revision 90880:
  - Fixed bug that could lead to memory errors due to the use
    of a Python disctionary for a mapping that can grow large.
  
  (Not large enough to use a lot of memory, but large enough to cause
    malloc to fail. :()
  

Changed:
  U   ZODB/trunk/src/ZODB/FileStorage/FileStorage.py

-=-
Modified: ZODB/trunk/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2008-09-05 17:56:52 UTC (rev 90879)
+++ ZODB/trunk/src/ZODB/FileStorage/FileStorage.py	2008-09-05 17:56:54 UTC (rev 90880)
@@ -44,6 +44,8 @@
 from ZODB.loglevels import BLATHER
 from ZODB.fsIndex import fsIndex
 
+import BTrees.OOBTree
+
 packed_version = "FS21"
 
 logger = logging.getLogger('ZODB.FileStorage')
@@ -222,7 +224,7 @@
 
     def _newIndexes(self):
         # hook to use something other than builtin dict
-        return fsIndex(), {}, {}, {}, {}
+        return fsIndex(), {}, BTrees.OOBTree.OOBTree(), {}, {}
 
     _saved = 0
     def _save_index(self):



More information about the Zodb-checkins mailing list