When using a static libunwind, the check_memcpy.c can fail because it checks that tsan intercepted all memcpy/memmoves in the final binary. Though if the static libunwind is not instrumented, then this will fail because it may contain regular memcpy/memmoves. This adds a new REQUIRES check for ensuring that this test won't run unless a dynamic libunwind.so is provided. Differential Revision: https://reviews.llvm.org/D111194
21 lines
584 B
C
21 lines
584 B
C
// Test that verifies TSan runtime doesn't contain compiler-emitted
|
|
// memcpy/memmove calls. It builds the binary with TSan and check's
|
|
// its objdump.
|
|
|
|
// This could fail if using a static libunwind because that static libunwind
|
|
// could be uninstrumented and contain memcpy/memmove calls not intercepted by
|
|
// tsan.
|
|
// REQUIRES: shared_unwind
|
|
|
|
// RUN: %clang_tsan -O1 %s -o %t
|
|
// RUN: llvm-objdump -d -l %t | FileCheck %s
|
|
|
|
int main() {
|
|
return 0;
|
|
}
|
|
|
|
// CHECK-NOT: callq {{.*<(__interceptor_)?mem(cpy|set)>}}
|
|
// tail calls:
|
|
// CHECK-NOT: jmpq {{.*<(__interceptor_)?mem(cpy|set)>}}
|
|
|