Bug 800138 - Bug found in python-cryptsetup-0.1.4-2.fc17 using gcc-with-cpychecker static analyzer
Bug found in python-cryptsetup-0.1.4-2.fc17 using gcc-with-cpychecker static ...
Product: Fedora
Classification: Fedora
Component: cryptsetup (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Milan Broz
Fedora Extras Quality Assurance
Depends On:
Blocks: cpychecker
  Show dependency treegraph
Reported: 2012-03-05 15:04 EST by Dave Malcolm
Modified: 2013-02-28 23:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-07-09 06:21:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dave Malcolm 2012-03-05 15:04:37 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
Comment 1 Milan Broz 2012-04-03 13:09:21 EDT
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.
Comment 2 Milan Broz 2012-07-09 06:21:23 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.