Bug 1228142 - clang-analyzer: adding clang static analysis support
Summary: clang-analyzer: adding clang static analysis support
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: scripts
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Prasanna Kumar Kalever
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-04 09:57 UTC by Prasanna Kumar Kalever
Modified: 2017-03-27 18:13 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.9.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-27 18:13:07 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Prasanna Kumar Kalever 2015-06-04 09:57:31 UTC
Description of problem:
clang static analyzer is a source code analysis tool that finds bugs in C, C++.

This patch automates clang analyzes part by integrating it with rfc.sh


Version-Release number of selected component (if applicable):
mainline

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Anand Avati 2015-06-04 09:58:10 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#1) for review on master by Prasanna Kumar Kalever

Comment 2 Anand Avati 2015-06-04 15:23:31 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#3) for review on master by Prasanna Kumar Kalever

Comment 3 Anand Avati 2015-06-10 11:05:23 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#4) for review on master by Prasanna Kumar Kalever

Comment 4 Anand Avati 2015-06-12 06:09:46 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#5) for review on master by Prasanna Kumar Kalever

Comment 5 Anand Avati 2015-06-12 06:19:15 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#6) for review on master by Prasanna Kumar Kalever

Comment 6 Anand Avati 2015-08-14 10:25:27 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#7) for review on master by Prasanna Kumar Kalever

Comment 7 Kaleb KEITHLEY 2015-10-22 17:00:12 UTC
changing version to mainline in order to retire pre-release.

If you know the appropriate, correct version for this bug, please
set it.

Comment 8 Kaleb KEITHLEY 2015-10-22 17:06:51 UTC
changing version to mainline in order to retire pre-release.

If you know the appropriate, correct version for this bug, please
set it.

Comment 9 Kaleb KEITHLEY 2015-10-22 17:11:18 UTC
changing version to mainline in order to retire pre-release.

If you know the appropriate, correct version for this bug, please
set it.

Comment 10 Vijay Bellur 2016-03-18 07:10:13 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#9) for review on master by Prasanna Kumar Kalever (prasanna.kalever)

Comment 11 Vijay Bellur 2016-03-18 10:28:50 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#10) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 12 Vijay Bellur 2016-03-21 11:31:08 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#11) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 13 Vijay Bellur 2016-03-22 08:33:33 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#12) for review on master by Raghavendra Talur (rtalur)

Comment 14 Vijay Bellur 2016-03-22 09:50:45 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#13) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 15 Mike McCune 2016-03-28 23:22:56 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 16 Vijay Bellur 2016-03-29 09:06:10 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#14) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 17 Vijay Bellur 2016-03-29 17:20:30 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#15) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 18 Vijay Bellur 2016-03-30 12:20:23 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#16) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 19 Vijay Bellur 2016-04-01 17:45:43 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#17) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 20 Vijay Bellur 2016-05-02 07:14:22 UTC
REVIEW: http://review.gluster.org/11083 (clang-analyzer: adding clang static analysis support) posted (#18) for review on master by Prasanna Kumar Kalever (pkalever)

Comment 21 Vijay Bellur 2016-06-07 13:56:13 UTC
COMMIT: http://review.gluster.org/11083 committed in master by Jeff Darcy (jdarcy) 
------
commit bdde0cfa1d5848e59d20c1adc19ee1b687eec66a
Author: Prasanna Kumar Kalever <prasanna.kalever>
Date:   Thu Jun 4 14:55:17 2015 +0530

    clang-analyzer: adding clang static analysis support
    
    clang static analyzer is a source code analysis tool that
    finds bugs in C, C++.
    
    This patch automates clang analyzes part by integrating
    it with 'make clang-check'
    
    clang-checker.sh: runs clang analyzer with and without the
    HEAD commit, and shows the bugs introduced by HEAD commit (if any)
    
    sample report:
    
    $[ glusterfs ]: make clang-check
    
    ================ Clang analyzer in progress ================
    ...
    
    BASELINE BUGS LIST (before applying patch):
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Out of bound array access --> 3
    Memory leak --> 1
    Unix API --> 24
    Dead increment --> 5
    Dereference of null pointer --> 1995
    Uninitialized argument value --> 2
    All Bugs --> 2872
    Called function pointer is null null dereference --> 4
    Dead initialization --> 49
    Dead assignment --> 691
    Undefined allocation of 0 bytes CERT MEM0 C CWE --> 5
    Argument with nonnull attribute passed null --> 84
    Result of operation is garbage or undefined --> 9
    
    TARGET BUGS LIST (after applying patch):
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Out of bound array access --> 3
    Memory leak --> 1
    Unix API --> 24
    Dead increment --> 5
    Dereference of null pointer --> 1995
    Uninitialized argument value --> 2
    All Bugs --> 2875
    Called function pointer is null null
    dereference --> 4
    Dead initialization --> 49
    Dead assignment --> 694
    Undefined allocation of 0 bytes CERT MEM0 C CWE --> 5
    Argument with nonnull attribute passed null --> 84
    Result of operation is garbage or undefined --> 9
    
    SUMMARY OF CLANG-ANALYZER:
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Extra 3 Bug[s] Introduced in: Dead assignment
    
    Patch Value given by Clang analyzer '-1'
    
    Explore complete results at
    /home/user/work/glusterfs/baseline/results/index.html
    /home/user/work/glusterfs/target/results/index.html
    
    ================= Done with Clang Analysis =================
    
    Change-Id: I512e33cfc02885a111152fbc1832144261dda1da
    BUG: 1228142
    Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever>
    Reviewed-on: http://review.gluster.org/11083
    Tested-by: Prasanna Kumar Kalever <pkalever>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    CentOS-regression: Gluster Build System <jenkins.com>
    Tested-by: Gluster Build System <jenkins.com>
    Smoke: Gluster Build System <jenkins.com>
    Reviewed-by: Raghavendra Talur <rtalur>
    Reviewed-by: Kaleb KEITHLEY <kkeithle>

Comment 22 Shyamsundar 2017-03-27 18:13:07 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.9.0, please open a new bug report.

glusterfs-3.9.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/


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