• Home
  • Raw
  • Download

Lines Matching refs:malloc

8 void *malloc(size_t);
24 int *p = malloc(12); in f1()
29 int *p = malloc(12); in f2()
35 int *p = malloc(12); in f2_realloc_0()
41 int *p = malloc(12); in f2_realloc_1()
47 char *p = (char*)malloc(size); in reallocNotNullPtr()
63 int *q = malloc(12); in realloctest1()
70 char *p = malloc(12); in reallocFails()
80 char *p = malloc(12); in reallocSizeZero1()
90 char *p = malloc(12); in reallocSizeZero2()
101 char *p = malloc(12); in reallocSizeZero3()
131 char *buf = malloc(100); in reallocRadar6337483_1()
140 char *buf = malloc(100); in reallocRadar6337483_2()
150 char * buf = malloc(100); in reallocRadar6337483_3()
162 char *buf = malloc(100); in reallocRadar6337483_4()
172 int *q = malloc(12); in reallocfTest1()
178 char *buf = malloc(100); in reallocfRadar6337483_4()
188 char * buf = malloc(100); in reallocfRadar6337483_3()
205 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn1()
214 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn3()
226 int *p = malloc(0); in CheckUseZeroAllocated1()
241 int *p = malloc(0); in CheckUseZeroAllocated3()
271 int *p = malloc(8); in CheckUseZeroAllocated8()
289 char *p = malloc(s); in CheckUseZeroAllocatedPathNoWarn()
302 char *p = malloc(s); in CheckUseZeroAllocatedPathWarn()
315 char *p = malloc(8); in CheckUseZeroReallocatedPathNoWarn()
329 char *p = malloc(8); in CheckUseZeroReallocatedPathWarn()
343 p = malloc(12); in f3()
352 p_f4 = malloc(12); in f4()
357 int *q = malloc(12); in f5()
363 int *p = malloc(12); in f6()
371 int *p = malloc(12); in f6_realloc()
390 char *x = (char*) malloc(4); in f7()
396 char *x = (char*) malloc(4); in f8()
402 char *x = (char*) malloc(4); in f7_realloc()
408 …int *x = malloc(11); // expected-warning{{Cast a region whose size is not a multiple of the destin… in PR6123()
412 …int *buf = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the desti… in PR7217()
420 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_emtpy_struct()
430 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_1()
440 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_2()
450 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_3()
460 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_4()
470 struct st *s = malloc(sizeof(struct st) - sizeof(char)); // no-warning in cast_struct_5()
480 …struct st *s = malloc(sizeof(struct st) + 2); // expected-warning{{Cast a region whose size is not… in cast_struct_warn_1()
490 …struct st *s = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the d… in cast_struct_warn_2()
500 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_1()
510 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_2()
520 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_3()
533 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_4()
546 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_5()
559 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_6()
572 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_1()
585 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_2()
598 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_3()
608 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_4()
618 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_5()
628 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_6()
633 void *p = malloc(2); in mallocCastToVoid()
639 void *p = malloc(2); in mallocCastToFP()
646 char *buf = malloc(2); in mallocGarbage()
689 int *p = malloc(12); in mallocEscapeRet()
694 int *p = malloc(12); in mallocEscapeFoo()
700 int *p = malloc(12); in mallocEscapeFree()
706 int *p = malloc(12); in mallocEscapeFreeFree()
713 int *p = malloc(12); in mallocEscapeFreeUse()
723 int *p = malloc(12); in mallocEscapeFreeCustomAlloc()
731 int *p = malloc(12); in mallocEscapeFreeCustomAlloc2()
739 int *x = malloc(12); in mallocBindFreeUse()
746 int *p = malloc(12); in mallocEscapeMalloc()
748 p = malloc(12); in mallocEscapeMalloc()
752 int *p = malloc(12); in mallocMalloc()
753 p = malloc(12); in mallocMalloc()
757 int *p = malloc(12); in mallocFreeMalloc()
759 p = malloc(12); in mallocFreeMalloc()
764 int *p = malloc(12); in mallocFreeUse_params()
770 int *p = malloc(12); in mallocFreeUse_params2()
776 int *p = malloc(12); in mallocFailedOrNot()
788 int *p = malloc(12); in mallocReturnFreed()
794 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in useAfterFreeStruct()
803 struct StructWithInt *p = malloc(sizeof(struct StructWithInt)); in mallocEscapeFooNonSymbolArg()
809 int *p = malloc(12); in mallocFailedOrNotLeak()
817 char *p = malloc(12); in mallocAssignment()
845 Gl = malloc(12); in GlobalMalloc()
849 int *a = malloc(12); in GlobalStructMalloc()
854 int *a = malloc(12); in GlobalStructMallocFree()
862 char *p = (char*)malloc(12); in globalArrayTest()
874 int *x = malloc(12); in testMalloc()
881 int *x = malloc(12); in testMalloc2()
888 int *x = malloc(12); in testMalloc3()
895 St.memP = malloc(12); in testStructLeak()
900 char *x = (void*)malloc(2); in testElemRegion1()
906 int *p = malloc(12); in testElemRegion2()
912 int *p = malloc(12); in testElemRegion3()
920 int *p = malloc(12); in PassTheAddrOfAllocatedData()
932 int *p = malloc(12); in foo2()
933 struct X *px= malloc(sizeof(struct X)); in foo2()
943 struct X *px= malloc(sizeof(struct X)); in RegInvalidationDetect1()
950 int *p = malloc(12); in RegInvalidationGiveUp1()
951 struct X *px= malloc(sizeof(struct X)); in RegInvalidationGiveUp1()
957 int *p = malloc(12); in RegInvalidationDetect2()
965 struct xx *p = malloc(12); in mallocExit()
978 struct xx *p = malloc(12); in mallocAssert()
986 char *p = malloc(12); in doNotInvalidateWhenPassedToSystemCalls()
998 char *p = malloc(12); in escapeSourceContents()
1001 void *p1 = malloc(7); in escapeSourceContents()
1008 int *allocated = (int *)malloc(4); in escapeSourceContents()
1016 int *p = (int *)malloc(4); in invalidateDestinationContents()
1020 ptrs1[0] = (int *)malloc(4); in invalidateDestinationContents()
1024 ptrs2[0] = (int *)malloc(4); in invalidateDestinationContents()
1028 ptrs3[0] = (int *)malloc(4); in invalidateDestinationContents()
1034 char *p = malloc(12); in symbolLostWithStrcpy()
1048 char *p = malloc(12); in symbolLostWithStrcpy_InlineStrcpyVersion()
1058 p = malloc( n+8 ); in specialMalloc()
1069 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in specialMallocWithStruct()
1102 void *buf = malloc(12); in testPthereadSpecificEscape()
1112 void *ctx = malloc(sizeof(int)); in useFunOpen()
1120 void *ctx = malloc(sizeof(int)); in useFunOpenNoReleaseFunction()
1132 void *ctx = malloc(sizeof(int)); in useFunOpenReadNoRelease()
1142 char *p = malloc(100); in my_main_no_warning()
1147 char *p = malloc(100); in my_main_no_warning2()
1152 char *p = malloc(100); in my_main_warn()
1168 buffer = malloc(myValueSize); in radar10978247()
1182 buffer = malloc(myValueSize); in radar10978247_positive()
1201 struct rdar11269741_a_t *p = (struct rdar11269741_a_t *) malloc(sizeof(*p)); in rdar11269741()
1208 void *ptr = malloc (16); in radar11329382()
1224 void *ptr = malloc(16); in radar_11358224_test_double_assign_ints_positive_2()
1233 char *x = malloc(12); in r11160612_1()
1239 char *x = malloc(12); in r11160612_2()
1245 char *x = malloc(12); in r11160612_4()
1251 void *x = malloc(12); in r11160612_5()
1255 void *x = malloc(12); in r11160612_6()
1273 p = malloc(12); in dependsOnValueOfPtr()
1285 int *x1 = malloc(8); in CMPRegionHeapToStack()
1294 int *x1 = malloc(8); in CMPRegionHeapToHeap2()
1295 int *x2 = malloc(8); in CMPRegionHeapToHeap2()
1306 int *x1 = malloc(8); in CMPRegionHeapToHeap()
1317 int *x = malloc(4); in HeapAssignment()
1330 int *m = malloc(8); in cmpHeapAllocationToUnknown()
1339 char *p = (char*)malloc(12); in localArrayTest()
1347 pSt->memP = malloc(12); in localStructTest()
1358 void *ptr = malloc (16); // no-warning in test_double_assign_ints()
1364 void *ptr = malloc(16); in test_double_assign_ints_positive()
1371 void *ptr = malloc(16); in testCGContextNoLeak()
1381 void *ptr = malloc(16); in testCGContextLeak()
1450 char * string = malloc(sizeof(char)*10); in testPassConstPointer()
1456 char *p = malloc(1); in testPassConstPointerIndirectly()
1464 hp.p = malloc(10); in testPassConstPointerIndirectlyStruct()
1471 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStruct()
1479 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStructFree()
1486 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArray()
1494 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArrayFree()
1500 int *memoryBlock = (int *)malloc(size + sizeof(int)); in testOffsetAllocate()
1509 __int64_t * array = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed()
1515 __int64_t *p = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed2()
1521 char *r = malloc(sizeof(char)); in testOffsetOfRegionFreed3()
1527 int *p = malloc(sizeof(int)*2); in testOffsetOfRegionFreedAfterFunctionCall()
1534 int * array = malloc(sizeof(int)*2); in testFixManipulatedPointerBeforeFree()
1540 char *r = malloc(sizeof(char)); in testFixManipulatedPointerBeforeFree2()
1546 __int64_t *p = malloc(sizeof(__int64_t)*2); in freeOffsetPointerPassedToFunction()
1555 char *r = malloc(sizeof(char)); in freeUnknownOffsetPointer()
1574 int *array = malloc(sizeof(int)*2); in testOffsetZeroDoubleFree()
1581 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlen()
1587 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlenThenFree()
1594 char * string = malloc(sizeof(char)*10); in testOffsetPassedAsConst()
1614 *memory = malloc(47); in testReallocEscaped()
1624 return malloc(1); // this branch is never called in smallocNoWarn()
1627 return malloc(size); in smallocNoWarn()
1640 return malloc(1); in smallocWarn()
1643 return malloc(size); in smallocWarn()
1655 int *data = (int *)malloc(32); in radar15580979()
1656 int *p = data ?: (int*)malloc(32); // no warning in radar15580979()
1662 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer1()
1667 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer2()
1672 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer3()
1681 *p = (int*) malloc(sizeof(int)); in testMallocWithParam()
1686 *p = (int*) malloc(sizeof(int)); // no-warning in testMallocWithParam_2()
1690 int *p = malloc(4); in testPassToSystemHeaderFunctionIndirectly()