Bug 791186

Summary: Memory leaks found in bluefish-2.2.1-2.fc17 using gcc-with-cpychecker static analyzer
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: bluefishAssignee: Paul Howarth <paul>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: paul
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-16/bluefish-2.2.1-2.fc17/
Whiteboard:
Fixed In Version: bluefish-2.2.2-1.fc17 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-03-06 20:23:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 789472    

Description Dave Malcolm 2012-02-16 12:34:04 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
bluefish-2.2.1-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):
http://fedorapeople.org/~dmalcolm/gcc-python-plugin/2012-02-16/bluefish-2.2.1-2.fc17/

I manually inspected the results, and the two memory leaks in "Reference leaks" appear to be geunine bugs:
  zencoding.c:zencoding_run_action:ob_refcnt of '*ptr' is 1 too high
(memory leak in error handling)

  zeneditor-interface.c:get_caret_placeholder:ob_refcnt of '*pcaret_placeholder' is 1 too high
(memory leak under normal operation, I think)

The other reported errors seem to be unlikely to happen in practice.

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

Comment 1 Paul Howarth 2012-02-17 16:06:05 UTC
I have reported this upstream:

https://bugzilla.gnome.org/show_bug.cgi?id=670297

Comment 2 Fedora Update System 2012-02-29 22:47:48 UTC
bluefish-2.2.2-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/bluefish-2.2.2-1.fc17

Comment 3 Fedora Update System 2012-03-02 00:58:46 UTC
Package bluefish-2.2.2-1.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing bluefish-2.2.2-1.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-2809/bluefish-2.2.2-1.fc17
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2012-03-06 20:23:34 UTC
bluefish-2.2.2-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.