[llvm-bugs] [Bug 38067] New: Some lines are considered as uncoverable when using __gcov_flush
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 5 05:58:04 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38067
Bug ID: 38067
Summary: Some lines are considered as uncoverable when using
__gcov_flush
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: profile
Assignee: unassignedbugs at nondot.org
Reporter: mcastelluccio at mozilla.com
CC: llvm-bugs at lists.llvm.org
-: 0:Source:main.c
-: 0:Graph:main.gcno
-: 0:Data:main.gcda
-: 0:Runs:1
-: 0:Programs:1
-: 1:extern void __gcov_flush(void);
-: 2:
1: 3:void f(int c) {}
-: 4:
-: 5:int main(int argc, char *argv[]) {
1: 6: f(1);
-: 7:
1: 8: __gcov_flush();
-: 9:
1: 10: f(2);
-: 11:
1: 12: _exit(0);
-: 13:
-: 14: f(3);
-: 15:
-: 16: return 0;
#####: 17:}
-: 18:
Lines 14 and 16 are coverable, they should be shown as uncovered.
GCC suffers from a similar bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86411.
Lines 10 and 12 should probably not be considered as covered, as we are
flushing the counters at line 8 and _exit is quitting the program without
writing out the counters. So anything that happens after line 8 should not be
counted.
--
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/20180705/b54d4887/attachment-0001.html>
More information about the llvm-bugs
mailing list