[llvm-bugs] [Bug 49419] New: [LLVM-COV] No coverage with "Segmentation fault (core dumped)"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 3 18:11:08 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=49419
Bug ID: 49419
Summary: [LLVM-COV] No coverage with "Segmentation fault (core
dumped)"
Product: Runtime Libraries
Version: 11.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: libprofile library
Assignee: unassignedbugs at nondot.org
Reporter: cnwy1996 at outlook.com
CC: llvm-bugs at lists.llvm.org
$ clang -v
clang version 11.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/wangyang/llvm-project/build/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.5.0
Candidate multilib: .;@m64
Selected multilib: .;@m64
$ cat test.c
#include <stdio.h>
char fixed_regs[0x00080000];
int main() {
printf("PASSED\n");
return fixed_regs[0x000ff000];
}
$ clang -w -O0 -g -fcoverage-mapping -fprofile-instr-generate=test.profraw
test.c; ./a.out; llvm-profdata merge test.profraw -o test.profdata; llvm-cov
show a.out -instr-profile=test.profdata test.c > test.lcov; cat test.lcov
PASSED
Segmentation fault (core dumped)
1| |#include <stdio.h>
2| |char fixed_regs[0x00080000];
3| |
4| 0|int main() {
5| 0|printf("PASSED\n");
6| 0|return fixed_regs[0x000ff000];
7| 0|}
8| |
Obviously, main function has been execute. However, no coverage information
generated.
--
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/20210304/32a1b8bd/attachment.html>
More information about the llvm-bugs
mailing list