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: unassignedb...@nondot.org
          Reporter: cnwy1...@outlook.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to