1 // RUN: %clang_lsan %s -o %t
2 // RUN: %env_lsan_opts=allocator_may_return_null=1:max_allocation_size_mb=1:use_stacks=0 not %run %t 2>&1 | FileCheck %s
4 /// Fails when only leak sanitizer is enabled
5 // UNSUPPORTED: arm-linux, armhf-linux
11 // CHECK: {{Leak|Address}}Sanitizer failed to allocate 0x100001 bytes
13 // CHECK: {{Leak|Address}}Sanitizer: detected memory leaks
14 // CHECK: {{Leak|Address}}Sanitizer: 9 byte(s) leaked in 1 allocation(s).
18 fprintf(stderr
, "nine: %p\n", p
);
19 assert(realloc(p
, 0x100001) == NULL
); // 1MiB+1