Bug 790693 - 4 functions with reference leaks within sssd (src/python/pyhbac.c)
Summary: 4 functions with reference leaks within sssd (src/python/pyhbac.c)
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sssd
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: cpychecker 790854
TreeView+ depends on / blocked
 
Reported: 2012-02-15 08:16 UTC by Dave Malcolm
Modified: 2020-05-02 16:45 UTC (History)
7 users (show)

Fixed In Version: sssd-1.12.3-2.fc21
Clone Of:
: 790854 (view as bug list)
Environment:
Last Closed: 2015-01-17 23:57:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 2237 0 None None None 2020-05-02 16:45:04 UTC

Description Dave Malcolm 2012-02-15 08:16:53 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

I ran the latest version of the tool (in git master; post 0.9) on sssd-1.6.2-5.fc16.src.rpm, and it reports various errors, 4 of which appear to be genuine memory leaks.

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-15/sssd-1.6.2-5.fc16/

Note that the 4 bugs reported in the top-most category ("Reference count too low") appear to be false positives due to bugs in the tool.

I believe that the 3 errors reported within the second category ("Reference leaks") *are* genuine memory leaks.

Within the third category ("Possible reference leaks"), I believe that the first two errors are false positives, but the third appears to be a genuine leak:
  src/python/pysss.c:PySssLocalObject_new: ob_refcnt of '*self' is 1 too high

The fourth category ("Returning (PyObject*)NULL without setting an exception") appear to all be false positives: the checker doesn't know that PyErr_SetSssError(ret) sets an exception.

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):
sssd-1.6.2-5.fc16
gcc-python-plugin post-0.9 git 073d390de53ef52136bd90e5ac06f1ef833d047d running the checker manually in an *f16* chroot; automated build failed with 
checking whether we are cross compiling... configure: error: in `/builddir/build/BUILD/sssd-1.6.2':
configure: error: cannot run C compiled programs.

which seemed to be due to "-specs=/usr/lib/rpm/redhat/redhat-hardened-ld" in LDFLAGS ; could be due to using f16 chroot, rather than rawhide/f17.

[1] http://fedoraproject.org/wiki/Features/StaticAnalysisOfPythonRefcounts

Comment 1 Stephen Gallagher 2012-02-15 13:17:38 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/1195

Comment 2 Fedora End Of Life 2013-04-03 19:44:19 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Jakub Hrozek 2015-01-07 15:45:56 UTC
* master: c52d7c41e4127a84f487777c0efa6996f6389c51

Comment 5 Fedora Update System 2015-01-09 20:13:02 UTC
sssd-1.12.3-2.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/sssd-1.12.3-2.fc21

Comment 6 Fedora End Of Life 2015-01-09 22:25:56 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora Update System 2015-01-10 11:55:55 UTC
sssd-1.12.3-2.fc21 has been pushed to the Fedora 21 testing repository.

Comment 8 Fedora Update System 2015-01-17 23:57:54 UTC
sssd-1.12.3-2.fc21 has been pushed to the Fedora 21 stable repository.


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