<html>
<head>
<base href="https://bugs.llvm.org/">
</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 - For programs which fork, some lines are wrongly considered as hit twice"
href="https://bugs.llvm.org/show_bug.cgi?id=38180">38180</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>For programs which fork, some lines are wrongly considered as hit twice
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>profile
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcastelluccio@mozilla.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>For example:
-: 0:Source:main.c
-: 0:Graph:main.gcno
-: 0:Data:main.gcda
-: 0:Runs:2
-: 0:Programs:1
-: 1:#include <unistd.h>
-: 2:
function main called 2 returned 100% blocks executed 100%
-: 3:int main(void) {
2: 4: int j = 22;
-: 5:
2: 6: fork();
-: 7:
2: 8: int i = 7;
-: 9:
2: 10: return 0;
-: 11:}
With GCC:
-: 0:Source:main.c
-: 0:Graph:main.gcno
-: 0:Data:main.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:#include <unistd.h>
-: 2:
1: 3:int main(void) {
1: 4: int j = 22;
-: 5:
1: 6: fork();
-: 7:
2: 8: int i = 7;
-: 9:
2: 10: return 0;
-: 11:}
The difference is probably due to the fact that GCC injects a __gcov_flush call
before the actual fork (similarly for execl, execlp, ...).</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>