<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - scan-build: Single bug in a header file reported multiple times"
   href="http://llvm.org/bugs/show_bug.cgi?id=16809">16809</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>scan-build: Single bug in a header file reported multiple times
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Static Analyzer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>kremenek@apple.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>filip.bartek-spam@hotmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=10993" name="attach_10993" title="Scripts that reproduce the behavior; supplementary scripts; results of my test run">attachment 10993</a> <a href="attachment.cgi?id=10993&action=edit" title="Scripts that reproduce the behavior; supplementary scripts; results of my test run">[details]</a></span>
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:
   <a href="http://fastjet.fr/repo/fastjet-3.0.4.tar.gz">http://fastjet.fr/repo/fastjet-3.0.4.tar.gz</a>
   <a href="http://fastjet.fr/">http://fastjet.fr/</a>
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"</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>