summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2008-05-17 06:12:02 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2008-05-17 06:12:02 (GMT)
commit664782e1c855db7f78f961fb993461709a330277 (patch)
treecf526156c3ab8987f0fceeee89fcd6fc085680ea /Lib/bsddb
parentce956842e2f2953bc8eeeb209415121760a3b337 (diff)
downloadcpython-664782e1c855db7f78f961fb993461709a330277.zip
cpython-664782e1c855db7f78f961fb993461709a330277.tar.gz
cpython-664782e1c855db7f78f961fb993461709a330277.tar.bz2
issue2858: Fix potential memory corruption when bsddb.db.DBEnv.lock_get
and other bsddb.db object constructors raised an exception. Debugging & patch by Neal Norowitz.
Diffstat (limited to 'Lib/bsddb')
-rw-r--r--Lib/bsddb/test/test_lock.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_lock.py b/Lib/bsddb/test/test_lock.py
index eee12a4..9b9ce7b 100644
--- a/Lib/bsddb/test/test_lock.py
+++ b/Lib/bsddb/test/test_lock.py
@@ -97,11 +97,7 @@ class LockingTestCase(unittest.TestCase):
for t in threads:
t.join()
- def _DISABLED_test03_lock_timeout(self):
- # Disabled as this test crashes the python interpreter built in
- # debug mode with:
- # Fatal Python error: UNREF invalid object
- # the error occurs as marked below.
+ def test03_lock_timeout(self):
self.env.set_timeout(0, db.DB_SET_LOCK_TIMEOUT)
self.env.set_timeout(0, db.DB_SET_TXN_TIMEOUT)
self.env.set_timeout(123456, db.DB_SET_LOCK_TIMEOUT)
@@ -128,8 +124,6 @@ class LockingTestCase(unittest.TestCase):
self.assertNotEqual(anID, anID2)
lock = self.env.lock_get(anID, "shared lock", db.DB_LOCK_WRITE)
start_time=time.time()
- # FIXME: I see the UNREF crash as the interpreter trys to exit
- # from this call to lock_get.
self.assertRaises(db.DBLockNotGrantedError,
self.env.lock_get,anID2, "shared lock", db.DB_LOCK_READ)
end_time=time.time()