blob: a6d7c4c6cf9578e4ce2dce9fcf7f42e79920a580 [file] [log] [blame]
Thomas Livelyf0f80652016-07-14 14:29:59 -07001; Test that sz-clang.py and sz-clang++.py successfully replace calls to calloc
2
3; RUN: %S/../../pydir/sz-clang.py -fsanitize-address %S/Input/calloc.c -E \
4; RUN: | FileCheck %s
5
6; RUN: %S/../../pydir/sz-clang++.py -fsanitize-address %S/Input/calloc.c -E \
7; RUN: | FileCheck %s
8
9; CHECK-LABEL: int main(void) {
10; CHECK-NEXT: void *buf = (__asan_dummy_calloc(14, sizeof(int)));
11; CHECK-NEXT: strcpy(buf, "Hello, world!");
12; CHECK-NEXT: printf("%s\n", buf);
13; CHECK-NEXT: free(buf);
14; CHECK-NEXT: }