]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/asan/TestCases/Windows/aligned_mallocs.cc
1 // RUN: %clang_cl_asan -O0 %s -Fe%t
6 #define CHECK_ALIGNED(ptr,alignment) \
8 if (((uintptr_t)(ptr) % (alignment)) != 0) \
14 int *p
= (int*)_aligned_malloc(1024 * sizeof(int), 32);
19 p
= (int*)_aligned_malloc(128, 128);
20 CHECK_ALIGNED(p
, 128);
21 p
= (int*)_aligned_realloc(p
, 2048 * sizeof(int), 128);
22 CHECK_ALIGNED(p
, 128);
24 if (_aligned_msize(p
, 128, 0) != 2048 * sizeof(int))