<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 --- - gcda (gcov data) writer is not multi-process-safe, impacting coverage analysis and profiling of programs that fork()"
   href="http://llvm.org/bugs/show_bug.cgi?id=20986">20986</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>gcda (gcov data) writer is not multi-process-safe, impacting coverage analysis and profiling of programs that fork()
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </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>compiler-rt
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mark@chromium.org
          </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>llvm/projects/compiler-rt/lib/profile/GCDAProfiling.c says:

|* TODO: gcov is multi-process safe by having each exit open the existing file
|* and append to it. We'd like to achieve that and be thread-safe too.

(<a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?revision=215933&view=markup#l18">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/GCDAProfiling.c?revision=215933&view=markup#l18</a>)

I believe that this is causing a problem for test coverage analysis when the
test framework implements death tests in the way that gtest (googletest) does,
either as fork()-based or fork()-exec()-based. These are described as “fast”
and “threadsafe” respectively in
<a href="https://code.google.com/p/googletest/wiki/AdvancedGuide#How_It_Works">https://code.google.com/p/googletest/wiki/AdvancedGuide#How_It_Works</a>.

Regardless, I didn’t find a bug tracking this TODO, and it seems like there
should probably be one.</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>