]>
git.proxmox.com Git - rustc.git/blob - src/compiler-rt/test/scudo/interface.cpp
1 // RUN: %clang_scudo %s -o %t
4 // Tests that the sanitizer interface functions behave appropriately.
10 #include <sanitizer/allocator_interface.h>
12 int main(int argc
, char **argv
)
15 std::vector
<ssize_t
> sizes
{1, 8, 16, 32, 1024, 32768,
16 1 << 16, 1 << 17, 1 << 20, 1 << 24};
17 for (size_t size
: sizes
) {
21 if (!__sanitizer_get_ownership(p
))
23 if (__sanitizer_get_allocated_size(p
) < size
)