[Zodb-checkins] SVN: ZODB/branches/3.8/ - Fixed bug that could lead to memory errors due to the use

Jim Fulton jim at zope.com
Fri Aug 22 10:36:07 EDT 2008


Log message for revision 90128:
  - 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/branches/3.8/NEWS.txt
  U   ZODB/branches/3.8/src/ZODB/FileStorage/FileStorage.py

-=-
Modified: ZODB/branches/3.8/NEWS.txt
===================================================================
--- ZODB/branches/3.8/NEWS.txt	2008-08-22 14:22:45 UTC (rev 90127)
+++ ZODB/branches/3.8/NEWS.txt	2008-08-22 14:36:07 UTC (rev 90128)
@@ -5,8 +5,11 @@
 
 Bugs Fixed:
 
-- (???) Fixed bug #251037: Made packing of blob storages non-blocking.
+- (beta 7) Fixed bug that could lead to memory errors due to the use
+  of a Python disctionary for a mapping that can grow large.
 
+- (beta 7) Fixed bug #251037: Made packing of blob storages non-blocking.
+
 - (beta 6) Fixed a bug that could cause InvalidObjectReference errors
   for objects that were explicitly added to a database if the object
   was modified after a savepoint that added the object.

Modified: ZODB/branches/3.8/src/ZODB/FileStorage/FileStorage.py
===================================================================
--- ZODB/branches/3.8/src/ZODB/FileStorage/FileStorage.py	2008-08-22 14:22:45 UTC (rev 90127)
+++ ZODB/branches/3.8/src/ZODB/FileStorage/FileStorage.py	2008-08-22 14:36:07 UTC (rev 90128)
@@ -43,6 +43,8 @@
 from ZODB.loglevels import BLATHER
 from ZODB.fsIndex import fsIndex
 
+import BTrees.OOBTree
+
 packed_version = "FS21"
 
 logger = logging.getLogger('ZODB.FileStorage')
@@ -229,7 +231,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