Bug 791168 - Bugs found in PyPAM_getenvlist in PyPAM-0.5.0-12.fc17 using gcc-with-cpychecker static analyzer
Summary: Bugs found in PyPAM_getenvlist in PyPAM-0.5.0-12.fc17 using gcc-with-cpycheck...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: PyPAM
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL: http://fedorapeople.org/~dmalcolm/gcc...
Whiteboard:
Depends On:
Blocks: cpychecker
TreeView+ depends on / blocked
 
Reported: 2012-02-16 11:55 UTC by Dave Malcolm
Modified: 2012-05-04 19:59 UTC (History)
2 users (show)

Fixed In Version: PyPAM-0.5.0-13.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-04 19:59:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dave Malcolm 2012-02-16 11:55:36 UTC
Description of problem:
I've been writing an experimental static analysis tool to detect bugs commonly occurring within C Python extension modules:
  https://fedorahosted.org/gcc-python-plugin/
  http://gcc-python-plugin.readthedocs.org/en/latest/cpychecker.html
  http://fedoraproject.org/wiki/Features/StaticAnalysisOfPythonRefcounts

I ran the latest version of the tool (in git master; post 0.9) on
PyPAM-0.5.0-12.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):
http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-16/PyPAM-0.5.0-12.fc17/

This shows two places in PyPAM_getenvlist where it doesn't check for a NULL result (e.g. under low memory).  These appear to be genuine bugs.

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):
PyPAM-0.5.0-12.fc17
gcc-python-plugin post-0.9 git 073d390de53ef52136bd90e5ac06f1ef833d047d running the checker in an *f16* chroot

Comment 1 Tomas Mraz 2012-05-04 19:59:47 UTC
Fixed, and many other similar errors as well.

Thanks for the bug report.


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