<html>
    <head>
      <base href="https://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 --- - Coverage data includes call to __cxx_global_array_dtor"
   href="https://llvm.org/bugs/show_bug.cgi?id=28769">28769</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Coverage data includes call to __cxx_global_array_dtor
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.9
          </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>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm.flamefire@spamgourmet.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16834" name="attach_16834" title="GCOV file">attachment 16834</a> <a href="attachment.cgi?id=16834&action=edit" title="GCOV file">[details]</a></span>
GCOV file

I was using clang++ with the --coverage flag to generate coverage data on a
larger project (<a href="https://github.com/Return-To-The-Roots/s25client">https://github.com/Return-To-The-Roots/s25client</a>)
However I see an completely unexpected call to "__cxx_global_array_dtor" in the
gcno file which should not be there and leads to false positives. The line I've
seen this is this one:
<a href="https://github.com/Return-To-The-Roots/s25client/blob/14796d1cb7423a87f9698001db650fa6262ae4ee/src/ingameWindows/iwPostWindow.cpp#L69">https://github.com/Return-To-The-Roots/s25client/blob/14796d1cb7423a87f9698001db650fa6262ae4ee/src/ingameWindows/iwPostWindow.cpp#L69</a>
A line that is almost the same as the surrounding ones, but the only one that
got that call attributed.

I was not able to create a mini-example with this behaviour as clang coverage
works in almost all other cases, especially trivial ones.

I attach the raw gcov file (llvm-cov gcov <gcda file> --dump), just search for
"__cxx_global_array_dtor"</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>