diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-11-21 05:29:34 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-11-21 05:29:34 +0000 |
commit | 5890a6a8a68eb5658b7002501ec30e2e30eba144 (patch) | |
tree | d1291b4caabb196a7cd1b3eb0eb950ea9f60a2fb /Modules/_bsddb.c | |
parent | bb4e6dcff51ea03a762f12a1e9c1fbdcfcdbbe38 (diff) | |
download | cpython-git-5890a6a8a68eb5658b7002501ec30e2e30eba144.tar.gz |
Backport of 52811:
Bug #1599782: Fix segfault on bsddb.db.DB().type().
The problem is that _DB_get_type() can't be called without the GIL
because it calls a bunch of PyErr_* APIs when an error occurs.
There were no other cases in this file that it was called without the GIL.
Removing the BEGIN/END THREAD around _DB_get_type() made everything work.
Diffstat (limited to 'Modules/_bsddb.c')
-rw-r--r-- | Modules/_bsddb.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c index 9d56e2765d..8e343a652e 100644 --- a/Modules/_bsddb.c +++ b/Modules/_bsddb.c @@ -1779,9 +1779,7 @@ DB_get_type(DBObject* self, PyObject* args) return NULL; CHECK_DB_NOT_CLOSED(self); - MYDB_BEGIN_ALLOW_THREADS; type = _DB_get_type(self); - MYDB_END_ALLOW_THREADS; if (type == -1) return NULL; return PyInt_FromLong(type); |