Ticket #1195 (new defect)

Opened 2 years ago

Last modified 9 months ago

4 functions with reference leaks within sssd (src/python/pyhbac.c)

Reported by: sgallagh Owned by: somebody
Priority: major Milestone: SSSD 1.12 beta
Component: IPA Provider Version: 1.6.2
Keywords: Cc: dmalcolm
Blocked By: Blocking:
Tests Updated: no Coverity Bug:
Patch Submitted: no Red Hat Bugzilla: 790693 790854
Design link:
Feature Milestone:
Design review: no Fedora test page:
Chosen: Not need Candidate to push out: no
Release Notes:

Description

https://bugzilla.redhat.com/show_bug.cgi?id=790693 (Fedora)

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.fc1
6/

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

Change History

comment:1 Changed 2 years ago by dpal

  • Priority changed from major to minor
  • Milestone changed from NEEDS_TRIAGE to SSSD 1.10.0
  • Tests Updated unset
  • upgrade set to 0
  • tests set to 0
  • Patch Submitted unset

comment:2 Changed 2 years ago by dpal

  • Red Hat Bugzilla changed from [https://bugzilla.redhat.com/show_bug.cgi?id=790693 790693] to [https://bugzilla.redhat.com/show_bug.cgi?id=790693 790693] [https://bugzilla.redhat.com/show_bug.cgi?id=790854 790854]

comment:3 Changed 2 years ago by dmalcolm

  • Cc dmalcolm added

comment:4 Changed 20 months ago by dpal

  • proposed_priority set to Important

comment:5 Changed 20 months ago by dpal

  • Milestone changed from SSSD 1.10.0 to Temp milestone

Cleaning the 1.10 milestones before putting tickets into it.

comment:6 Changed 20 months ago by dpal

  • Milestone changed from Temp milestone to SSSD 1.10.0

Moving planned features and bug fixes into the 1.10 bucket.

comment:7 Changed 20 months ago by dpal

  • Milestone changed from SSSD 1.10.0 to Temp milestone

comment:8 Changed 20 months ago by dpal

  • Milestone changed from Temp milestone to SSSD 1.10 beta

Moving all the features planned for 1.10 release into 1.10 beta.

comment:9 Changed 20 months ago by dpal

  • Priority changed from minor to major

comment:10 Changed 16 months ago by dpal

  • Chosen set to Not need

comment:11 Changed 16 months ago by dpal

  • Milestone changed from SSSD 1.10 beta to SSSD 1.11 beta

Moving tickets that are not a priority for SSSD 1.10 into the next release.

comment:12 Changed 9 months ago by dpal

  • Candidate to push out unset
  • Milestone changed from SSSD 1.13 beta to Interim Bucket
  • Design review unset

comment:13 Changed 9 months ago by dpal

  • Milestone changed from Interim Bucket to SSSD 1.12 beta
Note: See TracTickets for help on using tickets.