[LLVMbugs] [Bug 16809] New: scan-build: Single bug in a header file reported multiple times
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Aug 6 10:55:51 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16809
Bug ID: 16809
Summary: scan-build: Single bug in a header file reported
multiple times
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Static Analyzer
Assignee: kremenek at apple.com
Reporter: filip.bartek-spam at hotmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 10993
--> http://llvm.org/bugs/attachment.cgi?id=10993&action=edit
Scripts that reproduce the behavior; supplementary scripts; results of my test
run
Overview:
scan-build reports (in the HTML report) a single occurence of a bug several
times when run on fastjet v3.0.4.
Steps to Reproduce:
1) Download and extract fastjet v3.0.4:
http://fastjet.fr/repo/fastjet-3.0.4.tar.gz
http://fastjet.fr/
2) cd fastjet3.0.4
3) scan-build ./configure --enable-debug
4) scan-build -enable-checker alpha.cplusplus.VirtualCall make
Or you can simply execute the script "report.sh" after extracting the attached
archive. Inspect the script for more detailed steps.
Actual Results:
The bug VirtualCall in file "ClusterSequenceStructure.hh" on line 69 reported 9
times in the HTML report.
See "report-make/2013-08-06-1" in the attached archive.
Expected Results:
The bug VirtualCall in file "ClusterSequenceStructure.hh" on line 69 reported
only once in the HTML report.
Build Date & Platform:
2013-08-06
Linux 2.6.32-358.14.1.el6.x86_64 #1 SMP Wed Jul 17 08:30:19 CEST 2013 x86_64
x86_64 x86_64 GNU/Linux
Additional Information:
(Note that all the following paths are relative to the root directory of the
attached archive "multireport-fastjet.tar.gz".)
The bug is detected by the checker "alpha.cplusplus.VirtualCall".
The bug is detected in the file
"./fastjet3.0.4/include/fastjet/ClusterSequenceStructure.hh", in the definition
of function "ClusterSequenceStructure::ClusterSequenceStructure(const
ClusterSequence *)", on line 69.
The bug occurence is reported 9 times in total.
The bug is detected in a header file that is (indirectly) #included in more
than 9 of the analyzed ("scan-built") files.
The bug is reported 51 times (that is more than 9 times) in the error output of
the respective scan-build call. (Run "./count.sh" to see the number of
occurences in "run.log".)
Note that I tried implanting a non-alpha bug in the same place that the
VirtualCall bug is detected (i.e. file
"./fastjet3.0.4/include/fastjet/ClusterSequenceStructure.hh", definition of
function "ClusterSequenceStructure::ClusterSequenceStructure(const
ClusterSequence *)") and it was reported the same number of times. (Note that I
haven't attached the scripts that reproduce this behavior.)
The attached archive "multireport-fastjet.tar.gz" contains the following:
report.sh : Reproduce the behavior; requires scan-build, clang
setup-clang.sh : Setup clang and scan-build (from trunk); requires: svn, cmake
run.sh : Run setup-clang.sh and report.sh
run-log.sh : Run run.sh with logging to the file "run.log"
run.log : Log from my test run
report-make : HTML report from my test run
count.sh : Count the number of occurences of the bug in "run.log"
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130806/a8994f50/attachment.html>
More information about the llvm-bugs
mailing list