Lines Matching refs:malloc
23 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()
126 char *p = malloc(12); in reallocSizeZero3()
156 char *buf = malloc(100); in reallocRadar6337483_1()
165 char *buf = malloc(100); in reallocRadar6337483_2()
175 char * buf = malloc(100); in reallocRadar6337483_3()
187 char *buf = malloc(100); in reallocRadar6337483_4()
197 int *q = malloc(12); in reallocfTest1()
203 char *buf = malloc(100); in reallocfRadar6337483_4()
213 char * buf = malloc(100); in reallocfRadar6337483_3()
230 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn1()
244 int *p = malloc(0); in CheckUseZeroAllocatedNoWarn3()
256 int *p = malloc(0); in CheckUseZeroAllocated1()
276 int *p = malloc(0); in CheckUseZeroAllocated3()
306 int *p = malloc(8); in CheckUseZeroAllocated8()
324 char *p = malloc(s); in CheckUseZeroAllocatedPathNoWarn()
337 char *p = malloc(s); in CheckUseZeroAllocatedPathWarn()
350 char *p = malloc(8); in CheckUseZeroReallocatedPathNoWarn()
364 char *p = malloc(8); in CheckUseZeroReallocatedPathWarn()
378 p = malloc(12); in f3()
387 p_f4 = malloc(12); in f4()
392 int *q = malloc(12); in f5()
398 int *p = malloc(12); in f6()
406 int *p = malloc(12); in f6_realloc()
425 char *x = (char*) malloc(4); in f7()
431 char *x = (char*) malloc(4); in f8()
437 char *x = (char*) malloc(4); in f7_realloc()
443 …int *x = malloc(11); // expected-warning{{Cast a region whose size is not a multiple of the destin… in PR6123()
447 …int *buf = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the desti… in PR7217()
455 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_emtpy_struct()
465 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_1()
475 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_2()
485 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_3()
495 struct st *s = malloc(sizeof(struct st)); // no-warning in cast_struct_4()
505 struct st *s = malloc(sizeof(struct st) - sizeof(char)); // no-warning in cast_struct_5()
515 …struct st *s = malloc(sizeof(struct st) + 2); // expected-warning{{Cast a region whose size is not… in cast_struct_warn_1()
525 …struct st *s = malloc(2); // expected-warning{{Cast a region whose size is not a multiple of the d… in cast_struct_warn_2()
535 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_1()
545 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_2()
555 struct st *s = malloc(sizeof(struct st) + 3); // no-warning in cast_struct_flex_array_3()
568 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_4()
581 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_5()
594 struct st *s = malloc(sizeof(struct st) + 3 * sizeof(struct foo)); // no-warning in cast_struct_flex_array_6()
607 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_1()
620 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_2()
633 …struct st *s = malloc(3 * sizeof(struct st) + 3 * sizeof(struct foo)); // expected-warning{{Cast a… in cast_struct_flex_array_warn_3()
643 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_4()
653 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_5()
663 …struct st *s = malloc(sizeof(struct st) + 3); // expected-warning{{Cast a region whose size is not… in cast_struct_flex_array_warn_6()
668 void *p = malloc(2); in mallocCastToVoid()
674 void *p = malloc(2); in mallocCastToFP()
681 char *buf = malloc(2); in mallocGarbage()
724 int *p = malloc(12); in mallocEscapeRet()
729 int *p = malloc(12); in mallocEscapeFoo()
735 int *p = malloc(12); in mallocEscapeFree()
741 int *p = malloc(12); in mallocEscapeFreeFree()
748 int *p = malloc(12); in mallocEscapeFreeUse()
758 int *p = malloc(12); in mallocEscapeFreeCustomAlloc()
766 int *p = malloc(12); in mallocEscapeFreeCustomAlloc2()
774 int *x = malloc(12); in mallocBindFreeUse()
781 int *p = malloc(12); in mallocEscapeMalloc()
783 p = malloc(12); in mallocEscapeMalloc()
787 int *p = malloc(12); in mallocMalloc()
788 p = malloc(12); in mallocMalloc()
792 int *p = malloc(12); in mallocFreeMalloc()
794 p = malloc(12); in mallocFreeMalloc()
799 int *p = malloc(12); in mallocFreeUse_params()
805 int *p = malloc(12); in mallocFreeUse_params2()
811 int *p = malloc(12); in mallocFailedOrNot()
823 int *p = malloc(12); in mallocReturnFreed()
829 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in useAfterFreeStruct()
838 struct StructWithInt *p = malloc(sizeof(struct StructWithInt)); in mallocEscapeFooNonSymbolArg()
844 int *p = malloc(12); in mallocFailedOrNotLeak()
852 char *p = malloc(12); in mallocAssignment()
880 Gl = malloc(12); in GlobalMalloc()
884 int *a = malloc(12); in GlobalStructMalloc()
889 int *a = malloc(12); in GlobalStructMallocFree()
897 char *p = (char*)malloc(12); in globalArrayTest()
909 int *x = malloc(12); in testMalloc()
916 int *x = malloc(12); in testMalloc2()
923 int *x = malloc(12); in testMalloc3()
930 St.memP = malloc(12); in testStructLeak()
935 char *x = (void*)malloc(2); in testElemRegion1()
941 int *p = malloc(12); in testElemRegion2()
947 int *p = malloc(12); in testElemRegion3()
955 int *p = malloc(12); in PassTheAddrOfAllocatedData()
967 int *p = malloc(12); in foo2()
968 struct X *px= malloc(sizeof(struct X)); in foo2()
978 struct X *px= malloc(sizeof(struct X)); in RegInvalidationDetect1()
985 int *p = malloc(12); in RegInvalidationGiveUp1()
986 struct X *px= malloc(sizeof(struct X)); in RegInvalidationGiveUp1()
992 int *p = malloc(12); in RegInvalidationDetect2()
1000 struct xx *p = malloc(12); in mallocExit()
1013 struct xx *p = malloc(12); in mallocAssert()
1021 char *p = malloc(12); in doNotInvalidateWhenPassedToSystemCalls()
1033 char *p = malloc(12); in escapeSourceContents()
1036 void *p1 = malloc(7); in escapeSourceContents()
1043 int *allocated = (int *)malloc(4); in escapeSourceContents()
1051 int *p = (int *)malloc(4); in invalidateDestinationContents()
1055 ptrs1[0] = (int *)malloc(4); in invalidateDestinationContents()
1059 ptrs2[0] = (int *)malloc(4); in invalidateDestinationContents()
1063 ptrs3[0] = (int *)malloc(4); in invalidateDestinationContents()
1069 char *p = malloc(12); in symbolLostWithStrcpy()
1083 char *p = malloc(12); in symbolLostWithStrcpy_InlineStrcpyVersion()
1093 p = malloc( n+8 ); in specialMalloc()
1104 struct StructWithInt *px= malloc(sizeof(struct StructWithInt)); in specialMallocWithStruct()
1170 void *buf = malloc(12); in testPthereadSpecificEscape()
1180 void *ctx = malloc(sizeof(int)); in useFunOpen()
1188 void *ctx = malloc(sizeof(int)); in useFunOpenNoReleaseFunction()
1200 void *ctx = malloc(sizeof(int)); in useFunOpenReadNoRelease()
1210 char *p = malloc(100); in my_main_no_warning()
1215 char *p = malloc(100); in my_main_no_warning2()
1220 char *p = malloc(100); in my_main_warn()
1236 buffer = malloc(myValueSize); in radar10978247()
1250 buffer = malloc(myValueSize); in radar10978247_positive()
1269 struct rdar11269741_a_t *p = (struct rdar11269741_a_t *) malloc(sizeof(*p)); in rdar11269741()
1276 void *ptr = malloc (16); in radar11329382()
1292 void *ptr = malloc(16); in radar_11358224_test_double_assign_ints_positive_2()
1301 char *x = malloc(12); in r11160612_1()
1307 char *x = malloc(12); in r11160612_2()
1313 char *x = malloc(12); in r11160612_4()
1319 void *x = malloc(12); in r11160612_5()
1323 void *x = malloc(12); in r11160612_6()
1341 p = malloc(12); in dependsOnValueOfPtr()
1353 int *x1 = malloc(8); in CMPRegionHeapToStack()
1362 int *x1 = malloc(8); in CMPRegionHeapToHeap2()
1363 int *x2 = malloc(8); in CMPRegionHeapToHeap2()
1374 int *x1 = malloc(8); in CMPRegionHeapToHeap()
1385 int *x = malloc(4); in HeapAssignment()
1398 int *m = malloc(8); in cmpHeapAllocationToUnknown()
1407 char *p = (char*)malloc(12); in localArrayTest()
1415 pSt->memP = malloc(12); in localStructTest()
1426 void *ptr = malloc (16); // no-warning in test_double_assign_ints()
1432 void *ptr = malloc(16); in test_double_assign_ints_positive()
1439 void *ptr = malloc(16); in testCGContextNoLeak()
1449 void *ptr = malloc(16); in testCGContextLeak()
1526 char * string = malloc(sizeof(char)*10); in testPassConstPointer()
1532 char *p = malloc(1); in testPassConstPointerIndirectly()
1540 hp.p = malloc(10); in testPassConstPointerIndirectlyStruct()
1547 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStruct()
1555 ss.p = malloc(1); in testPassToSystemHeaderFunctionIndirectlyStructFree()
1562 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArray()
1570 p[0] = malloc(sizeof(int)); in testPassToSystemHeaderFunctionIndirectlyArrayFree()
1576 int *memoryBlock = (int *)malloc(size + sizeof(int)); in testOffsetAllocate()
1585 __int64_t * array = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed()
1591 __int64_t *p = malloc(sizeof(__int64_t)*2); in testOffsetOfRegionFreed2()
1597 char *r = malloc(sizeof(char)); in testOffsetOfRegionFreed3()
1603 int *p = malloc(sizeof(int)*2); in testOffsetOfRegionFreedAfterFunctionCall()
1610 int * array = malloc(sizeof(int)*2); in testFixManipulatedPointerBeforeFree()
1616 char *r = malloc(sizeof(char)); in testFixManipulatedPointerBeforeFree2()
1622 __int64_t *p = malloc(sizeof(__int64_t)*2); in freeOffsetPointerPassedToFunction()
1631 char *r = malloc(sizeof(char)); in freeUnknownOffsetPointer()
1650 int *array = malloc(sizeof(int)*2); in testOffsetZeroDoubleFree()
1657 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlen()
1663 char * string = malloc(sizeof(char)*10); in testOffsetPassedToStrlenThenFree()
1670 char * string = malloc(sizeof(char)*10); in testOffsetPassedAsConst()
1690 *memory = malloc(47); in testReallocEscaped()
1700 return malloc(1); // this branch is never called in smallocNoWarn()
1703 return malloc(size); in smallocNoWarn()
1716 return malloc(1); in smallocWarn()
1719 return malloc(size); in smallocWarn()
1731 int *data = (int *)malloc(32); in radar15580979()
1732 int *p = data ?: (int*)malloc(32); // no warning in radar15580979()
1738 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer1()
1743 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer2()
1748 int *data = (int *)malloc(32); in testEscapeThroughSystemCallTakingVoidPointer3()
1762 s.p = malloc(sizeof(int)); in testConstEscapeThroughAnotherField()
1770 *p = (int*) malloc(sizeof(int)); in testMallocWithParam()
1775 *p = (int*) malloc(sizeof(int)); // no-warning in testMallocWithParam_2()
1779 int *p = malloc(4); in testPassToSystemHeaderFunctionIndirectly()
1787 StructWithPtr *s = malloc(sizeof(StructWithPtr)); in testMallocIntoMalloc()
1788 s->memP = malloc(sizeof(int)); in testMallocIntoMalloc()