2016-08-16 06:30:37 +08:00
|
|
|
REQUIRES: x86-registered-target
|
2016-08-11 04:08:19 +08:00
|
|
|
RUN: sancov -print-coverage-pcs %p/Inputs/test-linux_x86_64 | FileCheck %s --check-prefix=LINUX
|
|
|
|
RUN: llvm-objdump -d %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=DISAS_WIN
|
|
|
|
RUN: sancov -print-coverage-pcs %p/Inputs/test-windows_x86_64 | FileCheck %s --check-prefix=WINDOWS
|
2016-08-13 03:25:59 +08:00
|
|
|
RUN: sancov -print-coverage-pcs %p/Inputs/test-darwin_x86_64 | FileCheck %s --check-prefix=DARWIN
|
2016-02-27 10:21:44 +08:00
|
|
|
|
2016-08-11 04:08:19 +08:00
|
|
|
LINUX: 0x4e132b
|
|
|
|
LINUX: 0x4e1472
|
|
|
|
LINUX: 0x4e14c2
|
|
|
|
LINUX: 0x4e1520
|
|
|
|
LINUX: 0x4e1553
|
|
|
|
LINUX: 0x4e1586
|
|
|
|
LINUX: 0x4e1635
|
|
|
|
LINUX: 0x4e1690
|
|
|
|
LINUX: 0x4e178c
|
2016-02-27 10:21:44 +08:00
|
|
|
|
2016-08-11 04:08:19 +08:00
|
|
|
The coverage PCs should be equal to the return address of the call minus one. A
|
|
|
|
direct call is five bytes, so the coverage PCs should be call PC plus four.
|
|
|
|
|
|
|
|
DISAS_WIN: 14000103f: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x140001043
|
|
|
|
DISAS_WIN: 140001074: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x140001078
|
|
|
|
DISAS_WIN: 1400011df: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x1400011e3
|
|
|
|
DISAS_WIN: 140001227: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x14000122b
|
|
|
|
DISAS_WIN: 14000147e: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x140001482
|
|
|
|
DISAS_WIN: 1400015b6: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x1400015ba
|
|
|
|
DISAS_WIN: 140001629: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x14000162d
|
|
|
|
DISAS_WIN: 140001664: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x140001668
|
|
|
|
DISAS_WIN: 1400016f2: {{.*}} callq {{.*}} <__sanitizer_cov>
|
|
|
|
WINDOWS: 0x1400016f6
|
2016-08-13 03:25:59 +08:00
|
|
|
|
|
|
|
CHECK: 0x4e132b
|
|
|
|
CHECK: 0x4e1472
|
|
|
|
CHECK: 0x4e14c2
|
|
|
|
CHECK: 0x4e1520
|
|
|
|
CHECK: 0x4e1553
|
|
|
|
CHECK: 0x4e1586
|
|
|
|
CHECK: 0x4e1635
|
|
|
|
CHECK: 0x4e1690
|
|
|
|
CHECK: 0x4e178c
|
|
|
|
|
|
|
|
DARWIN: 0x100001527
|
|
|
|
DARWIN: 0x100001668
|
|
|
|
DARWIN: 0x1000016b7
|
|
|
|
DARWIN: 0x1000016dd
|
|
|
|
DARWIN: 0x10000179d
|
|
|
|
DARWIN: 0x1000017cc
|
|
|
|
DARWIN: 0x10000189d
|
|
|
|
DARWIN: 0x1000018e0
|
|
|
|
DARWIN: 0x100001906
|
|
|
|
DARWIN: 0x1000019dc
|
|
|
|
DARWIN: 0x100001a28
|
2016-08-13 04:28:05 +08:00
|
|
|
|