Python GIL isn't reacquired when error is encountered
Bug #452195 reported by
lorenz quack
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Python-Crypto |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This may not be considered a bug but I though I report it anyway.
In "ALG_Encrypt()" and "ALG_Decrypt()" there is a "switch(mode)" after releasing the GIL.
In the "default" section of those switches the GIL isn't reacquired but calls to Python are made specifically "PyErr_Format()".
The "default" section is only entered when there is an error in the internal state (unknown mode) but still I think the GIL should be reacquired.
A patch is appended.
Changed in pycrypto: | |
milestone: | none → 2.1.0 |
To post a comment you must log in.
Agreed. If we're going to bother handling the default case at all, we should at least do it properly.
Fix committed: gitweb. pycrypto. org/?p= crypto/ pycrypto- 2.x.git; a=commitdiff; h=a7748d0e65fe1 7fbcb20f7b08653 6c3ccf68de43
http://