• Home
  • Raw
  • Download

Lines Matching refs:malloc

28 void *malloc(size_t);
50 int *p = malloc(12); in f1()
55 int *p = malloc(12); in f2()
61 int *p = malloc(12); in f2_realloc_0()
67 int *p = malloc(12); in f2_realloc_1()
73 char *p = (char*)malloc(size); in reallocNotNullPtr()
93 int *q = malloc(12); in realloctest1()
100 char *p = malloc(12); in reallocFails()
110 char *p = malloc(12); in reallocSizeZero1()
120 char *p = malloc(12); in reallocSizeZero2()
131 char *p = malloc(12); in reallocSizeZero3()
161 char *buf = malloc(100); in reallocRadar6337483_1()
170 char *buf = malloc(100); in reallocRadar6337483_2()
180 char * buf = malloc(100); in reallocRadar6337483_3()
192 char *buf = malloc(100); in reallocRadar6337483_4()
202 int *q = malloc(12); in reallocfTest1()
208 char *buf = malloc(100); in reallocfRadar6337483_4()
218 char * buf = malloc(100); in reallocfRadar6337483_3()
235 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn1()
249 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn3()
261 int *p = malloc(0); in CheckUseZeroAllocated1()
281 int *p = malloc(0); in CheckUseZeroAllocated3()
311 int *p = malloc(8); in CheckUseZeroAllocated8()
329 char *p = malloc(s); in CheckUseZeroAllocatedPathNoWarn()
342 char *p = malloc(s); in CheckUseZeroAllocatedPathWarn()
355 char *p = malloc(8); in CheckUseZeroReallocatedPathNoWarn()
369 char *p = malloc(8); in CheckUseZeroReallocatedPathWarn()
383 p = malloc(12); in f3()
392 p_f4 = malloc(12); in f4()
397 int *q = malloc(12); in f5()
403 int *p = malloc(12); in f6()
411 int *p = malloc(12); in f6_realloc()
430 char *x = (char*) malloc(4); in f7()
436 char *x = (char*) malloc(4); in f8()
442 char *x = (char*) malloc(4); in f7_realloc()
448 …int *x = malloc(11); // expected-warning{{Cast a region whose size is not a multiple of the destin… in PR6123()
452 …int *buf = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the desti… in PR7217()
460 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_emtpy_struct()
470 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_1()
480 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_2()
490 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_3()
500 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_4()
510 struct st *s = malloc(sizeof(struct st) - sizeof(char)); // no-warning in cast_struct_5()
520 …struct st *s = malloc(sizeof(struct st) + 2); // expected-warning{{Cast a region whose size is not… in cast_struct_warn_1()
530 …struct st *s = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the d… in cast_struct_warn_2()
540 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_1()
550 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_2()
560 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_3()
573 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_4()
586 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_5()
599 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_6()
612 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_1()
625 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_2()
638 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_3()
648 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_4()
658 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_5()
668 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_6()
673 void *p = malloc(2); in mallocCastToVoid()
679 void *p = malloc(2); in mallocCastToFP()
686 char *buf = malloc(2); in mallocGarbage()
729 int *p = malloc(12); in mallocEscapeRet()
734 int *p = malloc(12); in mallocEscapeFoo()
740 int *p = malloc(12); in mallocEscapeFree()
746 int *p = malloc(12); in mallocEscapeFreeFree()
753 int *p = malloc(12); in mallocEscapeFreeUse()
763 int *p = malloc(12); in mallocEscapeFreeCustomAlloc()
771 int *p = malloc(12); in mallocEscapeFreeCustomAlloc2()
779 int *x = malloc(12); in mallocBindFreeUse()
786 int *p = malloc(12); in mallocEscapeMalloc()
788 p = malloc(12); in mallocEscapeMalloc()
792 int *p = malloc(12); in mallocMalloc()
793 p = malloc(12); in mallocMalloc()
798 int *p = malloc(12); in mallocFreeMalloc()
800 p = malloc(12); in mallocFreeMalloc()
805 int *p = malloc(12); in mallocFreeUse_params()
811 int *p = malloc(12); in mallocFreeUse_params2()
817 int *p = malloc(12); in mallocFailedOrNot()
829 int *p = malloc(12); in mallocReturnFreed()
835 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in useAfterFreeStruct()
844 struct StructWithInt *p = malloc(sizeof(struct StructWithInt)); in mallocEscapeFooNonSymbolArg()
850 int *p = malloc(12); in mallocFailedOrNotLeak()
858 char *p = malloc(12); in mallocAssignment()
886 Gl = malloc(12); in GlobalMalloc()
890 int *a = malloc(12); in GlobalStructMalloc()
895 int *a = malloc(12); in GlobalStructMallocFree()
903 char *p = (char*)malloc(12); in globalArrayTest()
915 int *x = malloc(12); in testMalloc()
922 int *x = malloc(12); in testMalloc2()
929 int *x = malloc(12); in testMalloc3()
936 St.memP = malloc(12); in testStructLeak()
941 char *x = (void*)malloc(2); in testElemRegion1()
947 int *p = malloc(12); in testElemRegion2()
953 int *p = malloc(12); in testElemRegion3()
961 int *p = malloc(12); in PassTheAddrOfAllocatedData()
973 int *p = malloc(12); in foo2()
974 struct X *px= malloc(sizeof(struct X)); in foo2()
984 struct X *px= malloc(sizeof(struct X)); in RegInvalidationDetect1()
991 int *p = malloc(12); in RegInvalidationGiveUp1()
992 struct X *px= malloc(sizeof(struct X)); in RegInvalidationGiveUp1()
998 int *p = malloc(12); in RegInvalidationDetect2()
1006 struct xx *p = malloc(12); in mallocExit()
1019 struct xx *p = malloc(12); in mallocAssert()
1027 char *p = malloc(12); in doNotInvalidateWhenPassedToSystemCalls()
1039 char *p = malloc(12); in escapeSourceContents()
1042 void *p1 = malloc(7); in escapeSourceContents()
1049 int *allocated = (int *)malloc(4); in escapeSourceContents()
1057 int *p = (int *)malloc(4); in invalidateDestinationContents()
1061 ptrs1[0] = (int *)malloc(4); in invalidateDestinationContents()
1065 ptrs2[0] = (int *)malloc(4); in invalidateDestinationContents()
1069 ptrs3[0] = (int *)malloc(4); in invalidateDestinationContents()
1075 char *p = malloc(12); in symbolLostWithStrcpy()
1089 char *p = malloc(12); in symbolLostWithStrcpy_InlineStrcpyVersion()
1099 p = malloc( n+8 ); in specialMalloc()
1110 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in specialMallocWithStruct()
1176 void *buf = malloc(12); in testPthereadSpecificEscape()
1186 void *ctx = malloc(sizeof(int)); in useFunOpen()
1194 void *ctx = malloc(sizeof(int)); in useFunOpenNoReleaseFunction()
1206 void *ctx = malloc(sizeof(int)); in useFunOpenReadNoRelease()
1216 char *p = malloc(100); in my_main_no_warning()
1221 char *p = malloc(100); in my_main_no_warning2()
1226 char *p = malloc(100); in my_main_warn()
1242 buffer = malloc(myValueSize); in radar10978247()
1256 buffer = malloc(myValueSize); in radar10978247_positive()
1275 struct rdar11269741_a_t *p = (struct rdar11269741_a_t *) malloc(sizeof(*p)); in rdar11269741()
1282 void *ptr = malloc (16); in radar11329382()
1298 void *ptr = malloc(16); in radar_11358224_test_double_assign_ints_positive_2()
1307 char *x = malloc(12); in r11160612_1()
1313 char *x = malloc(12); in r11160612_2()
1319 char *x = malloc(12); in r11160612_4()
1325 void *x = malloc(12); in r11160612_5()
1329 void *x = malloc(12); in r11160612_6()
1347 p = malloc(12); in dependsOnValueOfPtr()
1359 int *x1 = malloc(8); in CMPRegionHeapToStack()
1368 int *x1 = malloc(8); in CMPRegionHeapToHeap2()
1369 int *x2 = malloc(8); in CMPRegionHeapToHeap2()
1380 int *x1 = malloc(8); in CMPRegionHeapToHeap()
1391 int *x = malloc(4); in HeapAssignment()
1404 int *m = malloc(8); in cmpHeapAllocationToUnknown()
1413 char *p = (char*)malloc(12); in localArrayTest()
1421 pSt->memP = malloc(12); in localStructTest()
1432 void *ptr = malloc (16); // no-warning in test_double_assign_ints()
1438 void *ptr = malloc(16); in test_double_assign_ints_positive()
1445 void *ptr = malloc(16); in testCGContextNoLeak()
1455 void *ptr = malloc(16); in testCGContextLeak()
1532 char * string = malloc(sizeof(char)*10); in testPassConstPointer()
1538 char *p = malloc(1); in testPassConstPointerIndirectly()
1546 hp.p = malloc(10); in testPassConstPointerIndirectlyStruct()
1553 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStruct()
1561 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStructFree()
1568 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArray()
1576 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArrayFree()
1582 int *memoryBlock = (int *)malloc(size + sizeof(int)); in testOffsetAllocate()
1591 __int64_t * array = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed()
1597 __int64_t *p = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed2()
1603 char *r = malloc(sizeof(char)); in testOffsetOfRegionFreed3()
1609 int *p = malloc(sizeof(int)*2); in testOffsetOfRegionFreedAfterFunctionCall()
1616 int * array = malloc(sizeof(int)*2); in testFixManipulatedPointerBeforeFree()
1622 char *r = malloc(sizeof(char)); in testFixManipulatedPointerBeforeFree2()
1628 __int64_t *p = malloc(sizeof(__int64_t)*2); in freeOffsetPointerPassedToFunction()
1637 char *r = malloc(sizeof(char)); in freeUnknownOffsetPointer()
1656 int *array = malloc(sizeof(int)*2); in testOffsetZeroDoubleFree()
1663 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlen()
1669 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlenThenFree()
1676 char * string = malloc(sizeof(char)*10); in testOffsetPassedAsConst()
1696 *memory = malloc(47); in testReallocEscaped()
1706 return malloc(1); // this branch is never called in smallocNoWarn()
1709 return malloc(size); in smallocNoWarn()
1722 return malloc(1); in smallocWarn()
1725 return malloc(size); in smallocWarn()
1730 int *data = (int *)malloc(32); in radar15580979()
1731 int *p = data ?: (int*)malloc(32); // no warning in radar15580979()
1737 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer1()
1742 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer2()
1747 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer3()
1761 s.p = malloc(sizeof(int)); in testConstEscapeThroughAnotherField()
1767 char *param = malloc(10); in testNoCheckerDataPropogationFromLogicalOpOperandToOpResult()
1768 char *value = malloc(10); in testNoCheckerDataPropogationFromLogicalOpOperandToOpResult()
1787 *ptr = malloc(1); in allocateSomeMemory()
1828 struct ConcreteListItem *x = malloc(sizeof(struct ConcreteListItem)); in testCStyleListItems()
1841 variable 'buf', which is not memory allocated by malloc() [unix.Malloc]}} in MEM34_C()
1863 *p = (int*) malloc(sizeof(int)); in testMallocWithParam()
1868 *p = (int*) malloc(sizeof(int)); // no-warning in testMallocWithParam_2()
1872 int *p = malloc(4); in testPassToSystemHeaderFunctionIndirectly()
1880 StructWithPtr *s = malloc(sizeof(StructWithPtr)); in testMallocIntoMalloc()
1881 s->memP = malloc(sizeof(int)); in testMallocIntoMalloc()