Red Hat Bugzilla – Bug 800138
Bug found in python-cryptsetup-0.1.4-2.fc17 using gcc-with-cpychecker static analyzer
Last modified: 2013-02-28 23:11:32 EST
Description of problem:
I've been writing an experimental static analysis tool to detect bugs commonly occurring within C Python extension modules:
I ran the latest version of the tool (in git master; post 0.9) on
python-cryptsetup-0.1.4-2.fc17.src.rpm, and it reports various errors.
You can see a list of errors here, triaged into categories (from most significant to least significant):
I've manually reviewed the issue reported by the tool:
pycryptsetup/cryptsetup.c:passwordDialog:ob_refcnt of '*result' is 1 too high
This appears to be a reference leak for the case where PyArg_Parse fails (if the callback returns a value that isn't a string): it's missing a Py_DECREF(result) on that path.
There may of course be other bugs in my checker tool.
Hope this is helpful; let me know if you need help reading the logs that the tool generates - I know that it could use some improvement.
Version-Release number of selected component (if applicable):
gcc-python-plugin post-0.9 git 11462291a66c8db693c8884cb84b795bb5988ffb running the checker in an *f16* chroot
Dave, python-cryptsetup module moved to cryptsetup package and upstream is now submodule of cryptsetup itself (rpm is build as subrpm as well)
It was renamed to cryptsetup-python though. See
Can you try to run against version there? I think I fixed a lot of problems there already.
I think this was fixed in python module merge to cryptsetup.
If not, please reopen and provide logs for new version (see comment #1), thanks.