Lines Matching +full:max +full:- +full:size
1 // RUN: %clangxx_scudo %s -lstdc++ -o %t
2 …ts=allocator_may_return_null=0 not %run %t malloc 2>&1 | FileCheck %s --check-prefix=CHECK-max
4 …allocator_may_return_null=0 not %run %t calloc 2>&1 | FileCheck %s --check-prefix=CHECK-calloc
6 …ts=allocator_may_return_null=0 not %run %t new 2>&1 | FileCheck %s --check-prefix=CHECK-max
7 …ts=allocator_may_return_null=1 not %run %t new 2>&1 | FileCheck %s --check-prefix=CHECK-oom
8 …o_opts=allocator_may_return_null=0 not %run %t new-nothrow 2>&1 | FileCheck %s --check-prefix=CHEC…
9 // RUN: %env_scudo_opts=allocator_may_return_null=1 %run %t new-nothrow 2>&1
12 // Tests for various edge cases related to sizes, notably the maximum size the
40 p = malloc(kMaxAllowedMallocSize - kChunkHeaderSize); in main()
44 size_t size = std::numeric_limits<size_t>::max(); in main() local
45 void *p = calloc((size / 0x1000) + 1, 0x1000); in main()
50 } else if (!strcmp(argv[1], "new-nothrow")) { in main()
54 // Playing with the actual usable size of a chunk. in main()
57 size_t size = __sanitizer_get_allocated_size(p); in main() local
58 assert(size >= 1007); in main()
59 memset(p, 'A', size); in main()
62 size = __sanitizer_get_allocated_size(p); in main()
63 assert(size >= 2014); in main()
64 memset(p, 'B', size); in main()
73 // CHECK-max: {{Scudo ERROR: requested allocation size .* exceeds maximum supported size}}
74 // CHECK-oom: Scudo ERROR: allocator is out of memory
75 // CHECK-calloc: Scudo ERROR: calloc parameters overflow