| /minix3/external/bsd/llvm/dist/clang/test/Analysis/ |
| H A D | malloc.c | 8 void *malloc(size_t); 23 int *p = malloc(12); in f1() 28 int *p = malloc(12); in f2() 34 int *p = malloc(12); in f2_realloc_0() 40 int *p = malloc(12); in f2_realloc_1() 46 char *p = (char*)malloc(size); in reallocNotNullPtr() 54 int *q = malloc(12); in realloctest1() 61 char *p = malloc(12); in reallocFails() 71 char *p = malloc(12); in reallocSizeZero1() 81 char *p = malloc(12); in reallocSizeZero2() [all …]
|
| H A D | malloc-annotations.c | 3 void *malloc(size_t); 7 void __attribute((ownership_returns(malloc))) *my_malloc(size_t); 8 void __attribute((ownership_takes(malloc, 1))) my_free(void *); 10 __attribute((ownership_holds(malloc, 1, 2))); 11 void __attribute((ownership_returns(malloc, 1))) *my_malloc2(size_t); 12 void __attribute((ownership_holds(malloc, 1))) my_hold(void *); 17 void __attribute((ownership_holds(malloc, 1))) 18 __attribute((ownership_holds(malloc, 1))) 19 __attribute((ownership_holds(malloc, 3))) my_hold2(void *, void *, void *); 28 int *p = malloc(12); in f1() [all …]
|
| H A D | malloc-overflow.c | 5 extern void * malloc(size_t); 9 …return malloc(n * sizeof(int)); // expected-warning {{the computation of the size of the memory a… in f1() 14 …return malloc(sizeof(int) * n); // // expected-warning {{the computation of the size of the memory… in f2() 19 return malloc(4 * sizeof(int)); // no-warning in f3() 29 …return malloc(s->n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f4() 35 …return malloc(s2.n * sizeof(int)); // expected-warning {{the computation of the size of the memory… in f5() 40 …return malloc((n + 1) * sizeof(int)); // expected-warning {{the computation of the size of the mem… in f6() 43 extern void * malloc (size_t); 49 return malloc(n * sizeof(int)); // no-warning in f7() 55 return malloc(n * sizeof(int)); // no-warning in f8() [all …]
|
| H A D | malloc-plist.c | 6 void *malloc(size_t); 12 int *p = malloc(12); in diagnosticTest() 20 A = malloc(2*sizeof(int*)); in myArrayAllocation() 25 char * buf = malloc(100); in reallocDiagnostics() 36 void *x = malloc(100); in wrapper() 54 *x = malloc(100); in my_malloc_and_free() 75 char *buf = (char *)malloc(100); in reallocIntra() 82 return (char*)malloc(12); in malloc_wrapper_ret() 93 p = (int*)malloc(12); in LeakedSymbol() 103 char *x = (char*)malloc(12); in function_with_leak1() [all …]
|
| H A D | malloc-sizeof.c | 5 void *malloc(size_t size); 14 int *ip1 = malloc(sizeof(1)); in foo() 15 int *ip2 = malloc(4 * sizeof(int)); in foo() 17 …long *lp1 = malloc(sizeof(short)); // expected-warning {{Result of 'malloc' is converted to a poin… in foo() 18 …long *lp2 = malloc(5 * sizeof(double)); // expected-warning {{Result of 'malloc' is converted to a… in foo() 19 char *cp3 = malloc(5 * sizeof(char) + 2); // no warning in foo() 20 unsigned char *buf = malloc(readSize + sizeof(unsignedInt)); // no warning in foo() 33 const char **x = (const char **)malloc(1 * sizeof(char *)); // no-warning in ignore_const() 34 …const char ***y = (const char ***)malloc(1 * sizeof(char *)); // expected-warning {{Result of 'mal… in ignore_const() 41 int *table = malloc(sizeof sTable); in mallocArraySize() [all …]
|
| H A D | Malloc+MismatchedDeallocator+NewDelete.cpp | 10 int *p = (int *)malloc(sizeof(int)); in testMallocDoubleFree() 16 int *p = (int *)malloc(sizeof(int)); in testMallocLeak() 20 int *p = (int *)malloc(sizeof(int)); in testMallocUseAfterFree() 31 int *p = (int *)malloc(sizeof(int)); in testMallocOffsetFree() 39 int *x = (int *)malloc(sizeof(int)); in testMismatchedDeallocator() 83 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePtrThroughCall() 89 int *p = (int*)malloc(sizeof(int)*4); in testMismatchedChangePointeeThroughCall() 95 int *p = (int*)malloc(sizeof(int)*4); in testShouldReportDoubleFreeNotMismatched()
|
| H A D | coverage.c | 5 void *malloc(size_t); 35 char *m = (char*)malloc(12); in coverage1() 41 char *m = (char*)malloc(12); in coverage2() 48 char *m = (char*)malloc(12); in coverage3() 54 char *m = (char*)malloc(12); in coverage4() 61 char *m = (char*)malloc(12); // no-warning in coverage5() 68 char *m = (char*)malloc(12); in coverage6() 80 char *m = (char*)malloc(12); in coverage8()
|
| H A D | malloc.mm | 3 #import "Inputs/system-header-simulator-for-malloc.h" 7 unsigned char *data = (unsigned char *)malloc(42); 12 unsigned char *data = (unsigned char *)malloc(42); 17 unsigned char *data = (unsigned char *)malloc(42); 22 unsigned char *data = (unsigned char *)malloc(42); 27 unsigned char *data = (unsigned char *)malloc(42); 32 unichar *data = (unichar*)malloc(42); 38 unsigned char *data = (unsigned char *)malloc(42); 43 unichar *data = (unichar*)malloc(42); 49 unsigned char *data = (unsigned char *)malloc(42); [all …]
|
| H A D | malloc.cpp | 4 void *malloc(size_t); 11 malloc(4); in checkThatMallocCheckerIsRunning() 20 return malloc(10); in aFunction() 29 char *x = (char*)malloc(12); in r11160612_3() 35 char *x = (char*)malloc(12); in r11160612_no_callback() 45 char *x = (char*)malloc(12); in r11160612_3() 64 v.push_back(malloc(4)); in testDestructors() 73 result.a = malloc(4); in get()
|
| H A D | NewDelete+MismatchedDeallocator_intersections.cpp | 6 void *malloc(size_t); 17 int *p1 = (int *)malloc(sizeof(int)); in testMallocFreeNoWarn() 20 int *p2 = (int *)malloc(sizeof(int)); in testMallocFreeNoWarn() 24 int *p3 = (int *)malloc(sizeof(int)); // no warn in testMallocFreeNoWarn() 26 int *p4 = (int *)malloc(sizeof(int)); in testMallocFreeNoWarn()
|
| H A D | new.cpp | 7 extern "C" void *malloc(size_t); 31 int *x = (int *)malloc(sizeof(int)); in testPlacementNew() 55 int *x = (int *)malloc(sizeof(int)); in testCustomNewMalloc() 85 return new PtrWrapper(static_cast<int *>(malloc(4))); // no-warning in testNewInvalidation() 90 new (w) PtrWrapper(static_cast<int *>(malloc(4))); // no-warning in testNewInvalidationPlacement() 95 return new (int *)(static_cast<int *>(malloc(4))); // no-warning in testNewInvalidationScalar() 100 new (p) (int *)(static_cast<int *>(malloc(4))); // no-warning in testNewInvalidationScalarPlacement() 139 int *x = (int *)malloc(sizeof(int)); in testDeleteMallocked() 144 int *p = (int *)malloc(sizeof(int)); in testDeleteOpAfterFree() 150 int *p = (int *)malloc(sizeof(int)); in testDeleteAfterFree() [all …]
|
| H A D | MismatchedDeallocator-checker-test.mm | 7 void *malloc(size_t); function 11 void __attribute((ownership_returns(malloc))) *my_malloc(size_t); 14 void __attribute((ownership_takes(malloc, 1))) my_free(void *); 20 //--------------- test malloc family 22 int *p = (int *)malloc(sizeof(int)); 23 …delete p; // expected-warning{{Memory allocated by malloc() should be deallocated by free(), not '… 27 int *p = (int *)malloc(8); 48 int *p = (int *)malloc(sizeof(int)); 49 …operator delete(p); // expected-warning{{Memory allocated by malloc() should be deallocated by fre… 53 int *p = (int *)malloc(sizeof(int)); [all …]
|
| H A D | malloc.m | 6 void *malloc(size_t); function 9 // RDar10579586 - Test use of malloc() with Objective-C string literal as a 10 // test condition. Not really a malloc() issue, but this also exercises 11 // the check that malloc() returns uninitialized memory. 26 if ((buffer = malloc(sizeof(struct rdar0579586_str))) == ((void*)0)) 44 MyArray *array = (MyArray *)malloc(12); 50 char *b = (char *)malloc(12); 55 void *buffer = malloc(4);
|
| H A D | malloc-interprocedural.c | 5 void *malloc(size_t); 17 *d = malloc(size); in my_malloc1() 22 data = malloc(size); in my_malloc2() 82 char *v = malloc(12); in testThatRemoveDeadBindingsRunBeforeEachCall() 96 int *x = (int*)malloc(12); in uafAndCallsFooWithEmptyReturn() 118 char *result = malloc(n + 1); in strndup()
|
| H A D | malloc-three-arg.c | 8 void *malloc(size_t, void *, int); 19 list = malloc(sizeof(*list) * 10, NULL, M_ZERO); in test_zeroed() 34 list = malloc(sizeof(*list) * 10, NULL, 0); in test_nonzero() 49 list = malloc(sizeof(*list) * 10, NULL, flags); in test_indeterminate()
|
| H A D | NewDelete-intersections.mm | 7 extern "C" void *malloc(size_t); 15 //----- malloc()/free() are subjects of unix.Malloc and unix.MallocWithAnnotations 20 int *p1 = (int *)malloc(sizeof(int)); function 23 int *p2 = (int *)malloc(sizeof(int)); function 27 int *p3 = (int *)malloc(sizeof(int)); // no warn function 29 int *p4 = (int *)malloc(sizeof(int)); function 35 int *p = (int *)malloc(sizeof(int));
|
| /minix3/external/bsd/llvm/dist/clang/test/Sema/ |
| H A D | attr-malloc.c | 7 void * malloc(size_t) __attribute((malloc)); 9 int no_vars __attribute((malloc)); // expected-warning {{functions returning a pointer type}} 11 void returns_void (void) __attribute((malloc)); // expected-warning {{functions returning a point… 12 int returns_int (void) __attribute((malloc)); // expected-warning {{functions returning a point… 13 int * returns_intptr(void) __attribute((malloc)); // no-warning 15 iptr returns_iptr (void) __attribute((malloc)); // no-warning 17 __attribute((malloc)) void *(*f)(); // expected-warning{{'malloc' attribute only applies to functi… 18 __attribute((malloc)) int (*g)(); // expected-warning{{'malloc' attribute only applies to functions… 20 __attribute((malloc)) 21 void * xalloc(unsigned n) { return malloc(n); } // no-warning in xalloc() [all …]
|
| /minix3/external/bsd/llvm/dist/clang/test/SemaObjC/ |
| H A D | attr-malloc.m | 4 - (id) test1 __attribute((malloc)); // expected-warning {{functions returning a pointer type}} argument 5 - (int) test2 __attribute((malloc)); // expected-warning {{functions returning a pointer type}} argument 8 id bar(void) __attribute((malloc)); // no-warning 11 bptr baz(void) __attribute((malloc)); // no-warning 13 __attribute((malloc)) id (*f)(); // expected-warning {{functions returning a pointer type}} 14 __attribute((malloc)) bptr (*g)(); // expected-warning {{functions returning a pointer type}} 15 __attribute((malloc)) void *(^h)(); // expected-warning {{functions returning a pointer type}}
|
| /minix3/external/bsd/llvm/dist/clang/test/CXX/temp/temp.decls/temp.class/temp.mem.func/ |
| H A D | pr5056.cpp | 4 extern "C" void * malloc(int); 7 void *malloc(int); 11 inline void *A<T>::malloc(int) in malloc() function in A 17 malloc(10); in f()
|
| /minix3/external/bsd/llvm/dist/llvm/test/Transforms/InstCombine/ |
| H A D | malloc-free-delete.ll | 6 …%malloc_206 = tail call i8* @malloc(i32 mul (i32 ptrtoint (i8* getelementptr (i8* null, i32 1) to … 15 declare noalias i8* @malloc(i32) 21 %m = call i8* @malloc(i32 1) 37 %a = call noalias i8* @malloc(i32 10) 54 %A = call i8* @malloc(i32 16000) 63 ; CHECK-NEXT: call i8* @malloc 64 ; CHECK-NEXT: call i8* @malloc 65 ; CHECK-NEXT: call i8* @malloc 66 ; CHECK-NEXT: call i8* @malloc 67 ; CHECK-NEXT: call i8* @malloc [all …]
|
| /minix3/external/bsd/llvm/dist/llvm/test/Transforms/GlobalOpt/ |
| H A D | 2009-11-16-MallocSingleStoreToGlobalVar.ll | 2 ; GlobalOpt was treating a non-optimizable array malloc as a non-array malloc 3 ; and optimizing the global object that the malloc was stored to as a single 20 %4 = call noalias i8* @malloc(i64 %3) nounwind ; <i8*> [#uses=1] 21 ; CHECK: call noalias i8* @malloc 30 declare noalias i8* @malloc(i64) nounwind
|
| /minix3/external/bsd/flex/dist/lib/ |
| H A D | malloc.c | 2 #undef malloc 6 void *malloc (); 16 return malloc (n); in rpl_malloc()
|
| /minix3/external/bsd/llvm/dist/clang/test/CodeGen/ |
| H A D | merge-attrs.c | 3 void *malloc(__SIZE_TYPE__ size) __attribute__ ((__nothrow__)); 6 malloc(1); in __zend_malloc() 9 void *malloc(__SIZE_TYPE__ size) __attribute__ ((__nothrow__));
|
| /minix3/external/bsd/llvm/dist/clang/test/Analysis/diagnostics/ |
| H A D | false-positive-suppression.c | 7 void *malloc(size_t); 10 int *p = malloc(12); in radar12491259() 19 int *p = malloc(12); in radar12491259_inside_macro()
|
| /minix3/crypto/external/bsd/heimdal/dist/lib/asn1/ |
| H A D | der_copy.c | 91 to->data = malloc(to->length + 1); in der_copy_printable_string() 110 to->data = malloc(to->length * sizeof(to->data[0])); in der_copy_bmp_string() 122 to->data = malloc(to->length * sizeof(to->data[0])); in der_copy_universal_string() 140 to->data = malloc(to->length); in der_copy_octet_string() 151 to->data = malloc(to->length); in der_copy_heim_integer() 163 to->components = malloc(to->length * sizeof(*to->components)); in der_copy_oid() 178 to->data = malloc(len); in der_copy_bit_string()
|