[RISCV] Add RVVConstraint to SiFive custom matrix multiply instructions. (#124055)
[llvm-project.git] / compiler-rt / test / asan / TestCases / Windows / intercept_memcpy.cpp
bloba80ab09b0e3bf61194c0d45ea4f9731fe19944c0
1 // RUN: %clang_cl_asan %Od %s %Fe%t
2 // RUN: not %run %t 2>&1 | FileCheck %s
4 #include <stdio.h>
5 #include <string.h>
7 void call_memcpy(void* (*f)(void *, const void *, size_t),
8 void *a, const void *b, size_t c) {
9 f(a, b, c);
12 int main() {
13 char buff1[6] = "Hello", buff2[5];
15 call_memcpy(&memcpy, buff2, buff1, 5);
16 if (buff1[2] != buff2[2])
17 return 2;
18 printf("Initial test OK\n");
19 fflush(0);
20 // CHECK: Initial test OK
22 call_memcpy(&memcpy, buff2, buff1, 6);
23 // CHECK: AddressSanitizer: stack-buffer-overflow on address [[ADDR:0x[0-9a-f]+]]
24 // CHECK: WRITE of size 6 at [[ADDR]] thread T0
25 // CHECK-NEXT: mem{{.*}}
26 // CHECK-NEXT: call_mem{{.*}}
27 // CHECK-NEXT: main {{.*}}intercept_memcpy.cpp:[[@LINE-5]]
28 // CHECK: Address [[ADDR]] is located in stack of thread T0 at offset {{.*}} in frame
29 // CHECK-NEXT: #0 {{.*}} main
30 // CHECK: 'buff2'{{.*}} <== Memory access at offset {{.*}} overflows this variable