Lines Matching refs:realloc
1 // Test the behavior of malloc/calloc/realloc when the allocation size is huge.
13 // RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rCRASH
14 // RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t realloc 2>&1 | FileCheck %s --check-prefix=CHECK-rNULL
15 // RUN: MSAN_OPTIONS=allocator_may_return_null=0 not %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrCRASH
16 // RUN: MSAN_OPTIONS=allocator_may_return_null=1 %run %t realloc-after-malloc 2>&1 | FileCheck %s --check-prefix=CHECK-mrNULL
45 if (!strcmp(argv[1], "realloc")) {
46 fprintf(stderr, "realloc:\n");
47 x = (char*)realloc(0, size);
49 if (!strcmp(argv[1], "realloc-after-malloc")) {
50 fprintf(stderr, "realloc-after-malloc:\n");
53 x = (char*)realloc(t, size);
67 // CHECK-rCRASH: realloc:
69 // CHECK-mrCRASH: realloc-after-malloc:
78 // CHECK-rNULL: realloc:
80 // CHECK-mrNULL: realloc-after-malloc: