Lines Matching refs:malloc

30 void *malloc(size_t);
52 int *p = malloc(12); in f1()
57 int *p = malloc(12); in f2()
63 int *p = malloc(12); in f2_realloc_0()
69 int *p = malloc(12); in f2_realloc_1()
75 char *p = (char*)malloc(size); in reallocNotNullPtr()
95 int *q = malloc(12); in realloctest1()
102 char *p = malloc(12); in reallocFails()
112 char *p = malloc(12); in reallocSizeZero1()
122 char *p = malloc(12); in reallocSizeZero2()
133 char *p = malloc(12); in reallocSizeZero3()
163 char *buf = malloc(100); in reallocRadar6337483_1()
172 char *buf = malloc(100); in reallocRadar6337483_2()
182 char * buf = malloc(100); in reallocRadar6337483_3()
194 char *buf = malloc(100); in reallocRadar6337483_4()
204 int *q = malloc(12); in reallocfTest1()
210 char *buf = malloc(100); in reallocfRadar6337483_4()
220 char * buf = malloc(100); in reallocfRadar6337483_3()
237 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn1()
251 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn3()
263 int *p = malloc(0); in CheckUseZeroAllocated1()
283 int *p = malloc(0); in CheckUseZeroAllocated3()
313 int *p = malloc(8); in CheckUseZeroAllocated8()
331 char *p = malloc(s); in CheckUseZeroAllocatedPathNoWarn()
344 char *p = malloc(s); in CheckUseZeroAllocatedPathWarn()
357 char *p = malloc(8); in CheckUseZeroReallocatedPathNoWarn()
371 char *p = malloc(8); in CheckUseZeroReallocatedPathWarn()
385 p = malloc(12); in f3()
394 p_f4 = malloc(12); in f4()
399 int *q = malloc(12); in f5()
405 int *p = malloc(12); in f6()
413 int *p = malloc(12); in f6_realloc()
432 char *x = (char*) malloc(4); in f7()
438 char *x = (char*) malloc(4); in f8()
444 char *x = (char*) malloc(4); in f7_realloc()
450 …int *x = malloc(11); // expected-warning{{Cast a region whose size is not a multiple of the destin… in PR6123()
454 …int *buf = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the desti… in PR7217()
462 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_emtpy_struct()
472 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_1()
482 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_2()
492 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_3()
502 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_4()
512 struct st *s = malloc(sizeof(struct st) - sizeof(char)); // no-warning in cast_struct_5()
522 …struct st *s = malloc(sizeof(struct st) + 2); // expected-warning{{Cast a region whose size is not… in cast_struct_warn_1()
532 …struct st *s = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the d… in cast_struct_warn_2()
542 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_1()
552 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_2()
562 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_3()
575 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_4()
588 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_5()
601 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_6()
614 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_1()
627 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_2()
640 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_3()
650 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_4()
660 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_5()
670 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_6()
675 void *p = malloc(2); in mallocCastToVoid()
681 void *p = malloc(2); in mallocCastToFP()
688 char *buf = malloc(2); in mallocGarbage()
731 int *p = malloc(12); in mallocEscapeRet()
736 int *p = malloc(12); in mallocEscapeFoo()
742 int *p = malloc(12); in mallocEscapeFree()
748 int *p = malloc(12); in mallocEscapeFreeFree()
755 int *p = malloc(12); in mallocEscapeFreeUse()
765 int *p = malloc(12); in mallocEscapeFreeCustomAlloc()
773 int *p = malloc(12); in mallocEscapeFreeCustomAlloc2()
781 int *x = malloc(12); in mallocBindFreeUse()
788 int *p = malloc(12); in mallocEscapeMalloc()
790 p = malloc(12); in mallocEscapeMalloc()
794 int *p = malloc(12); in mallocMalloc()
795 p = malloc(12); in mallocMalloc()
800 int *p = malloc(12); in mallocFreeMalloc()
802 p = malloc(12); in mallocFreeMalloc()
807 int *p = malloc(12); in mallocFreeUse_params()
813 int *p = malloc(12); in mallocFreeUse_params2()
819 int *p = malloc(12); in mallocFailedOrNot()
831 int *p = malloc(12); in mallocReturnFreed()
837 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in useAfterFreeStruct()
846 struct StructWithInt *p = malloc(sizeof(struct StructWithInt)); in mallocEscapeFooNonSymbolArg()
852 int *p = malloc(12); in mallocFailedOrNotLeak()
860 char *p = malloc(12); in mallocAssignment()
888 Gl = malloc(12); in GlobalMalloc()
892 int *a = malloc(12); in GlobalStructMalloc()
897 int *a = malloc(12); in GlobalStructMallocFree()
905 char *p = (char*)malloc(12); in globalArrayTest()
917 int *x = malloc(12); in testMalloc()
924 int *x = malloc(12); in testMalloc2()
931 int *x = malloc(12); in testMalloc3()
938 St.memP = malloc(12); in testStructLeak()
943 char *x = (void*)malloc(2); in testElemRegion1()
949 int *p = malloc(12); in testElemRegion2()
955 int *p = malloc(12); in testElemRegion3()
963 int *p = malloc(12); in PassTheAddrOfAllocatedData()
975 int *p = malloc(12); in foo2()
976 struct X *px= malloc(sizeof(struct X)); in foo2()
986 struct X *px= malloc(sizeof(struct X)); in RegInvalidationDetect1()
993 int *p = malloc(12); in RegInvalidationGiveUp1()
994 struct X *px= malloc(sizeof(struct X)); in RegInvalidationGiveUp1()
1000 int *p = malloc(12); in RegInvalidationDetect2()
1008 struct xx *p = malloc(12); in mallocExit()
1021 struct xx *p = malloc(12); in mallocAssert()
1029 char *p = malloc(12); in doNotInvalidateWhenPassedToSystemCalls()
1041 char *p = malloc(12); in escapeSourceContents()
1044 void *p1 = malloc(7); in escapeSourceContents()
1051 int *allocated = (int *)malloc(4); in escapeSourceContents()
1059 int *p = (int *)malloc(4); in invalidateDestinationContents()
1063 ptrs1[0] = (int *)malloc(4); in invalidateDestinationContents()
1067 ptrs2[0] = (int *)malloc(4); in invalidateDestinationContents()
1071 ptrs3[0] = (int *)malloc(4); in invalidateDestinationContents()
1077 char *p = malloc(12); in symbolLostWithStrcpy()
1091 char *p = malloc(12); in symbolLostWithStrcpy_InlineStrcpyVersion()
1101 p = malloc( n+8 ); in specialMalloc()
1112 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in specialMallocWithStruct()
1178 void *buf = malloc(12); in testPthereadSpecificEscape()
1188 void *ctx = malloc(sizeof(int)); in useFunOpen()
1196 void *ctx = malloc(sizeof(int)); in useFunOpenNoReleaseFunction()
1208 void *ctx = malloc(sizeof(int)); in useFunOpenReadNoRelease()
1218 char *p = malloc(100); in my_main_no_warning()
1223 char *p = malloc(100); in my_main_no_warning2()
1228 char *p = malloc(100); in my_main_warn()
1244 buffer = malloc(myValueSize); in radar10978247()
1258 buffer = malloc(myValueSize); in radar10978247_positive()
1277 struct rdar11269741_a_t *p = (struct rdar11269741_a_t *) malloc(sizeof(*p)); in rdar11269741()
1284 void *ptr = malloc (16); in radar11329382()
1300 void *ptr = malloc(16); in radar_11358224_test_double_assign_ints_positive_2()
1309 char *x = malloc(12); in r11160612_1()
1315 char *x = malloc(12); in r11160612_2()
1321 char *x = malloc(12); in r11160612_4()
1327 void *x = malloc(12); in r11160612_5()
1331 void *x = malloc(12); in r11160612_6()
1349 p = malloc(12); in dependsOnValueOfPtr()
1361 int *x1 = malloc(8); in CMPRegionHeapToStack()
1370 int *x1 = malloc(8); in CMPRegionHeapToHeap2()
1371 int *x2 = malloc(8); in CMPRegionHeapToHeap2()
1382 int *x1 = malloc(8); in CMPRegionHeapToHeap()
1393 int *x = malloc(4); in HeapAssignment()
1406 int *m = malloc(8); in cmpHeapAllocationToUnknown()
1415 char *p = (char*)malloc(12); in localArrayTest()
1423 pSt->memP = malloc(12); in localStructTest()
1434 void *ptr = malloc (16); // no-warning in test_double_assign_ints()
1440 void *ptr = malloc(16); in test_double_assign_ints_positive()
1447 void *ptr = malloc(16); in testCGContextNoLeak()
1457 void *ptr = malloc(16); in testCGContextLeak()
1534 char * string = malloc(sizeof(char)*10); in testPassConstPointer()
1540 char *p = malloc(1); in testPassConstPointerIndirectly()
1548 hp.p = malloc(10); in testPassConstPointerIndirectlyStruct()
1555 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStruct()
1563 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStructFree()
1570 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArray()
1578 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArrayFree()
1584 int *memoryBlock = (int *)malloc(size + sizeof(int)); in testOffsetAllocate()
1593 __int64_t * array = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed()
1599 __int64_t *p = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed2()
1605 char *r = malloc(sizeof(char)); in testOffsetOfRegionFreed3()
1611 int *p = malloc(sizeof(int)*2); in testOffsetOfRegionFreedAfterFunctionCall()
1618 int * array = malloc(sizeof(int)*2); in testFixManipulatedPointerBeforeFree()
1624 char *r = malloc(sizeof(char)); in testFixManipulatedPointerBeforeFree2()
1630 __int64_t *p = malloc(sizeof(__int64_t)*2); in freeOffsetPointerPassedToFunction()
1639 char *r = malloc(sizeof(char)); in freeUnknownOffsetPointer()
1658 int *array = malloc(sizeof(int)*2); in testOffsetZeroDoubleFree()
1665 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlen()
1671 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlenThenFree()
1678 char * string = malloc(sizeof(char)*10); in testOffsetPassedAsConst()
1698 *memory = malloc(47); in testReallocEscaped()
1708 return malloc(1); // this branch is never called in smallocNoWarn()
1711 return malloc(size); in smallocNoWarn()
1724 return malloc(1); in smallocWarn()
1727 return malloc(size); in smallocWarn()
1732 int *data = (int *)malloc(32); in radar15580979()
1733 int *p = data ?: (int*)malloc(32); // no warning in radar15580979()
1739 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer1()
1744 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer2()
1749 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer3()
1763 s.p = malloc(sizeof(int)); in testConstEscapeThroughAnotherField()
1769 char *param = malloc(10); in testNoCheckerDataPropogationFromLogicalOpOperandToOpResult()
1770 char *value = malloc(10); in testNoCheckerDataPropogationFromLogicalOpOperandToOpResult()
1791 *ptr = malloc(1); in allocateSomeMemory()
1832 struct ConcreteListItem *x = malloc(sizeof(struct ConcreteListItem)); in testCStyleListItems()
1845 variable 'buf', which is not memory allocated by malloc() [unix.Malloc]}} in MEM34_C()
1867 *p = (int*) malloc(sizeof(int)); in testMallocWithParam()
1872 *p = (int*) malloc(sizeof(int)); // no-warning in testMallocWithParam_2()
1876 int *p = malloc(4); in testPassToSystemHeaderFunctionIndirectly()
1884 StructWithPtr *s = malloc(sizeof(StructWithPtr)); in testMallocIntoMalloc()
1885 s->memP = malloc(sizeof(int)); in testMallocIntoMalloc()
1894 int *p = (int *)malloc(x); in testExtent()