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

Created 5 years ago by sgallagh
Modified a month ago

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:

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):

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
  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):
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
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

Fields changed

blockedby: =>
blocking: =>
coverity: =>
feature_milestone: =>
milestone: NEEDS_TRIAGE => SSSD 1.10.0
patch: => 0
priority: major => minor
tests: => 0
testsupdated: => 0
upgrade: => 0

Fields changed

cc: => dmalcolm

Fields changed

proposed_priority: => Important

Cleaning the 1.10 milestones before putting tickets into it.

milestone: SSSD 1.10.0 => Temp milestone

Moving planned features and bug fixes into the 1.10 bucket.

milestone: Temp milestone => SSSD 1.10.0

Fields changed

milestone: SSSD 1.10.0 => Temp milestone

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

milestone: Temp milestone => SSSD 1.10 beta

Fields changed

priority: minor => major

Fields changed

selected: => Not need

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

milestone: SSSD 1.10 beta => SSSD 1.11 beta

Fields changed

changelog: =>
design: =>
design_review: => 0
fedora_test_page: =>
milestone: SSSD 1.13 beta => Interim Bucket
review: => 0

Fields changed

milestone: Interim Bucket => SSSD 1.12 beta

Fields changed

milestone: SSSD 1.12 beta => SSSD 1.12.1

Fields changed

review: 0 => 1

Mass-moving all tickets that didn't make 1.12.1 into 1.12.2

milestone: SSSD 1.12.1 => SSSD 1.12.2

Fields changed

owner: somebody => preichl
status: new => assigned

We need to do a release as requested by downstream. Moving tickets that are not fixed already or very close to acking to 1.12.3

milestone: SSSD 1.12.2 => SSSD 1.12.3

Fields changed

mark: => 0
patch: 0 => 1

  • master: c52d7c41e4127a84f487777c0efa6996f6389c51

resolution: => fixed
status: assigned => closed

a month ago

Metadata Update from @sgallagh:
- Issue assigned to preichl
- Issue set to the milestone: SSSD 1.12.3

Login to comment on this ticket.


IPA Provider




https://bugzilla.redhat.com/show_bug.cgi?id=790693, https://bugzilla.redhat.com/show_bug.cgi?id=790854



Not need