Home
last modified time | relevance | path

Searched refs:malloc (Results 1 – 25 of 3251) sorted by relevance

12345678910>>...131

/external/clang/test/Analysis/
Dmalloc.c23 void *malloc(size_t);
45 int *p = malloc(12); in f1()
50 int *p = malloc(12); in f2()
56 int *p = malloc(12); in f2_realloc_0()
62 int *p = malloc(12); in f2_realloc_1()
68 char *p = (char*)malloc(size); in reallocNotNullPtr()
88 int *q = malloc(12); in realloctest1()
95 char *p = malloc(12); in reallocFails()
105 char *p = malloc(12); in reallocSizeZero1()
115 char *p = malloc(12); in reallocSizeZero2()
[all …]
Dmalloc-annotations.c3 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 …]
Dmalloc-plist.c6 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()
99 int *p = malloc(sizeof(int)); in call_myfree_takingblock()
108 p = (int*)malloc(12); in LeakedSymbol()
[all …]
Dmalloc-overflow.c5 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 …]
Dmalloc-sizeof.c5 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 …]
Dmalloc.mm3 #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 …]
DMalloc+MismatchedDeallocator+NewDelete.cpp10 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()
DMismatchedDeallocator-checker-test.mm7 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 …]
Dcoverage.c5 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()
Dnew.cpp7 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 …]
Dmalloc.cpp4 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()
Dmalloc-overflow2.c4 extern void *malloc(size_t);
7 void *malloc(unsigned long s);
18 …t->table = (unsigned *)malloc(sizeof(unsigned) * t->nentry); // expected-warning {{the computation… in table_build()
22 int *p = malloc(sizeof(int) * n); // no-warning in table_build()
30 t->table = (unsigned *)malloc(sizeof(unsigned) * t->nentry); // no-warning in table_build_1()
35 …return malloc(n * 0 * sizeof(int)); // expected-warning {{Call to 'malloc' has an allocation size … in f()
Dmalloc.m6 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);
DNewDelete+MismatchedDeallocator_intersections.cpp6 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()
/external/webrtc/webrtc/common_audio/resampler/
Dresampler.cc258 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
262 state1_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
267 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
270 state2_ = malloc(8 * sizeof(int32_t)); in Reset()
275 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
278 state2_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
283 state1_ = malloc(8 * sizeof(int32_t)); in Reset()
286 state2_ = malloc(8 * sizeof(int32_t)); in Reset()
289 state3_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
295 state1_ = malloc(sizeof(WebRtcSpl_State16khzTo48khz)); in Reset()
[all …]
/external/clang/test/Sema/
Dattr-malloc.c7 void * malloc(size_t) __attribute((malloc));
9 int no_vars __attribute((malloc)); // expected-warning {{attribute only applies to functions}}
11 void returns_void (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
12 int returns_int (void) __attribute((malloc)); // expected-warning {{attribute only applies to r…
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{{attribute only applies to functions}}
18 __attribute((malloc)) int (*g)(); // expected-warning{{attribute only applies to functions}}
20 __attribute((malloc))
21 void * xalloc(unsigned n) { return malloc(n); } // no-warning in xalloc()
[all …]
/external/google-fruit/tests/
Dvalgrind_suppressions.supp2 malloc/__emutls_get_address
5 fun:malloc
9 malloc/__dtoa
12 fun:malloc
17 malloc/tlv_get_addr
20 fun:malloc
25 malloc/__cxa_get_globals
28 fun:malloc
32 malloc/ImageLoader
35 fun:malloc
[all …]
/external/swiftshader/third_party/llvm-7.0/llvm/test/Transforms/InstCombine/
Dcompare-unescaped.ll5 declare i8* @malloc(i64) #1
8 %m = call i8* @malloc(i64 4)
18 %m = call i8* @malloc(i64 4)
29 ; we cannot remove the alloc site: call to malloc
30 ; The comparison should fold to false irrespective of whether the call to malloc can be elided or n…
34 %m = call i8* @malloc(i64 24)
46 %m = call i8* @malloc(i64 24)
58 %m = call i8* @malloc(i64 24)
72 %m = call i8* @malloc(i64 24)
87 %m = call i8* @malloc(i64 4)
[all …]
/external/llvm/test/Transforms/InstCombine/
Dcompare-unescaped.ll5 declare i8* @malloc(i64) #1
8 %m = call i8* @malloc(i64 4)
18 %m = call i8* @malloc(i64 4)
29 ; we cannot remove the alloc site: call to malloc
30 ; The comparison should fold to false irrespective of whether the call to malloc can be elided or n…
34 %m = call i8* @malloc(i64 24)
46 %m = call i8* @malloc(i64 24)
58 %m = call i8* @malloc(i64 24)
72 %m = call i8* @malloc(i64 24)
87 %m = call i8* @malloc(i64 4)
[all …]
Dmalloc-free-delete.ll6 …%malloc_206 = tail call i8* @malloc(i32 mul (i32 ptrtoint (i8* getelementptr (i8, i8* null, i32 1)…
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 …]
/external/clang/test/SemaObjC/
Dattr-malloc.m4 - (id) test1 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} argument
5 - (int) test2 __attribute((malloc)); // expected-warning {{attribute only applies to functions}} argument
8 id bar(void) __attribute((malloc)); // no-warning
11 bptr baz(void) __attribute((malloc)); // no-warning
13 __attribute((malloc)) id (*f)(); // expected-warning {{attribute only applies to functions}}
14 __attribute((malloc)) bptr (*g)(); // expected-warning {{attribute only applies to functions}}
15 __attribute((malloc)) void *(^h)(); // expected-warning {{attribute only applies to functions}}
/external/cblas/testing/
Dc_sblas3.c26 A = (float *)malloc( (*m)*LDA*sizeof( float ) ); in F77_sgemm()
33 A = ( float* )malloc( LDA*(*k)*sizeof( float ) ); in F77_sgemm()
40 B = ( float* )malloc( (*k)*LDB*sizeof( float ) ); in F77_sgemm()
47 B = ( float* )malloc( LDB*(*n)*sizeof( float ) ); in F77_sgemm()
53 C = ( float* )malloc( (*m)*LDC*sizeof( float ) ); in F77_sgemm()
88 A = ( float* )malloc( (*m)*LDA*sizeof( float ) ); in F77_ssymm()
95 A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); in F77_ssymm()
101 B = ( float* )malloc( (*m)*LDB*sizeof( float ) ); in F77_ssymm()
106 C = ( float* )malloc( (*m)*LDC*sizeof( float ) ); in F77_ssymm()
142 A = ( float* )malloc( (*n)*LDA*sizeof( float ) ); in F77_ssyrk()
[all …]
Dc_dblas3.c28 A = (double *)malloc( (*m)*LDA*sizeof( double ) ); in F77_dgemm()
35 A = ( double* )malloc( LDA*(*k)*sizeof( double ) ); in F77_dgemm()
42 B = ( double* )malloc( (*k)*LDB*sizeof( double ) ); in F77_dgemm()
49 B = ( double* )malloc( LDB*(*n)*sizeof( double ) ); in F77_dgemm()
55 C = ( double* )malloc( (*m)*LDC*sizeof( double ) ); in F77_dgemm()
91 A = ( double* )malloc( (*m)*LDA*sizeof( double ) ); in F77_dsymm()
98 A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); in F77_dsymm()
104 B = ( double* )malloc( (*m)*LDB*sizeof( double ) ); in F77_dsymm()
109 C = ( double* )malloc( (*m)*LDC*sizeof( double ) ); in F77_dsymm()
145 A = ( double* )malloc( (*n)*LDA*sizeof( double ) ); in F77_dsyrk()
[all …]
Dc_cblas3.c29 A=(CBLAS_TEST_COMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); in F77_cgemm()
38 A=(CBLAS_TEST_COMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_COMPLEX)); in F77_cgemm()
48 B=(CBLAS_TEST_COMPLEX* )malloc((*k)*LDB*sizeof(CBLAS_TEST_COMPLEX) ); in F77_cgemm()
57 B=(CBLAS_TEST_COMPLEX* )malloc(LDB*(*n)*sizeof(CBLAS_TEST_COMPLEX)); in F77_cgemm()
66 C=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX)); in F77_cgemm()
106 A= (CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); in F77_chemm()
115 A=(CBLAS_TEST_COMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_COMPLEX ) ); in F77_chemm()
123 B=(CBLAS_TEST_COMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_COMPLEX ) ); in F77_chemm()
130 C=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_COMPLEX ) ); in F77_chemm()
170 A=(CBLAS_TEST_COMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_COMPLEX)); in F77_csymm()
[all …]
Dc_zblas3.c29 A=(CBLAS_TEST_ZOMPLEX*)malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zgemm()
38 A=(CBLAS_TEST_ZOMPLEX* )malloc(LDA*(*k)*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zgemm()
48 B=(CBLAS_TEST_ZOMPLEX* )malloc((*k)*LDB*sizeof(CBLAS_TEST_ZOMPLEX) ); in F77_zgemm()
57 B=(CBLAS_TEST_ZOMPLEX* )malloc(LDB*(*n)*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zgemm()
66 C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zgemm()
106 A= (CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zhemm()
115 A=(CBLAS_TEST_ZOMPLEX* )malloc((*n)*LDA*sizeof(CBLAS_TEST_ZOMPLEX ) ); in F77_zhemm()
123 B=(CBLAS_TEST_ZOMPLEX* )malloc( (*m)*LDB*sizeof(CBLAS_TEST_ZOMPLEX ) ); in F77_zhemm()
130 C=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDC*sizeof(CBLAS_TEST_ZOMPLEX ) ); in F77_zhemm()
170 A=(CBLAS_TEST_ZOMPLEX* )malloc((*m)*LDA*sizeof(CBLAS_TEST_ZOMPLEX)); in F77_zsymm()
[all …]

12345678910>>...131