1 // Test allocator aliases.
3 // RUN: %clangxx_hwasan -O0 %s -o %t && %run %t
5 #include <sanitizer/hwasan_interface.h>
9 sink
= (void *)&__sanitizer_posix_memalign
;
10 sink
= (void *)&__sanitizer_memalign
;
11 sink
= (void *)&__sanitizer_aligned_alloc
;
12 sink
= (void *)&__sanitizer___libc_memalign
;
13 sink
= (void *)&__sanitizer_valloc
;
14 sink
= (void *)&__sanitizer_pvalloc
;
15 sink
= (void *)&__sanitizer_free
;
16 sink
= (void *)&__sanitizer_cfree
;
17 sink
= (void *)&__sanitizer_malloc_usable_size
;
18 sink
= (void *)&__sanitizer_mallinfo
;
19 sink
= (void *)&__sanitizer_mallopt
;
20 sink
= (void *)&__sanitizer_malloc_stats
;
21 sink
= (void *)&__sanitizer_calloc
;
22 sink
= (void *)&__sanitizer_realloc
;
23 sink
= (void *)&__sanitizer_reallocarray
;
24 sink
= (void *)&__sanitizer_malloc
;
27 void *p
= __sanitizer_malloc(100);
28 p
= __sanitizer_realloc(p
, 200);