• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1REQUIRES: x86-registered-target
2RUN: sancov -print-coverage-pcs %p/Inputs/test-linux_x86_64 | FileCheck %s --check-prefix=LINUX
3RUN: llvm-objdump -d %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=DISAS_WIN
4RUN: sancov -print-coverage-pcs %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=WINDOWS
5RUN: sancov -print-coverage-pcs %p/Inputs/test-darwin_x86_64 | FileCheck %s --check-prefix=DARWIN
6
7LINUX: 0x4e132b
8LINUX: 0x4e1472
9LINUX: 0x4e14c2
10LINUX: 0x4e1520
11LINUX: 0x4e1553
12LINUX: 0x4e1586
13LINUX: 0x4e1635
14LINUX: 0x4e1690
15LINUX: 0x4e178c
16
17The coverage PCs should be equal to the return address of the call minus one. A
18direct call is five bytes, so the coverage PCs should be call PC plus four.
19
20DISAS_WIN: 14000103f: {{.*}}  callq   {{.*}} <__sanitizer_cov>
21WINDOWS: 0x140001043
22DISAS_WIN: 140001074: {{.*}}  callq   {{.*}} <__sanitizer_cov>
23WINDOWS: 0x140001078
24DISAS_WIN: 1400011df: {{.*}}  callq   {{.*}} <__sanitizer_cov>
25WINDOWS: 0x1400011e3
26DISAS_WIN: 140001227: {{.*}}  callq   {{.*}} <__sanitizer_cov>
27WINDOWS: 0x14000122b
28DISAS_WIN: 14000147e: {{.*}}  callq   {{.*}} <__sanitizer_cov>
29WINDOWS: 0x140001482
30DISAS_WIN: 1400015b6: {{.*}}  callq   {{.*}} <__sanitizer_cov>
31WINDOWS: 0x1400015ba
32DISAS_WIN: 140001629: {{.*}}  callq   {{.*}} <__sanitizer_cov>
33WINDOWS: 0x14000162d
34DISAS_WIN: 140001664: {{.*}}  callq   {{.*}} <__sanitizer_cov>
35WINDOWS: 0x140001668
36DISAS_WIN: 1400016f2: {{.*}}  callq   {{.*}} <__sanitizer_cov>
37WINDOWS: 0x1400016f6
38
39CHECK: 0x4e132b
40CHECK: 0x4e1472
41CHECK: 0x4e14c2
42CHECK: 0x4e1520
43CHECK: 0x4e1553
44CHECK: 0x4e1586
45CHECK: 0x4e1635
46CHECK: 0x4e1690
47CHECK: 0x4e178c
48
49DARWIN: 0x100001527
50DARWIN: 0x100001668
51DARWIN: 0x1000016b7
52DARWIN: 0x1000016dd
53DARWIN: 0x10000179d
54DARWIN: 0x1000017cc
55DARWIN: 0x10000189d
56DARWIN: 0x1000018e0
57DARWIN: 0x100001906
58DARWIN: 0x1000019dc
59DARWIN: 0x100001a28
60
61