Home | History | Annotate | Download | only in Analysis

Lines Matching refs:memcpy

11 // path, such as memcpy and __memcpy_chk, or memcmp and bcmp. If VARIANT is
19 // declared carefully! See memcpy() for an example.
30 // memcpy()
39 #define memcpy(a,b,c) __memcpy_chk(a,b,c,(size_t)-1)
43 #define memcpy BUILTIN(memcpy)
44 void *memcpy(void *restrict s1, const void *restrict s2, size_t n);
53 memcpy(dst, src, 4); // no-warning
55 if (memcpy(dst, src, 4) != dst) {
67 memcpy(dst, src, 5); // expected-warning{{Memory copy function accesses out-of-bound array element}}
74 memcpy(dst, src, 4); // expected-warning{{Memory copy function overflows destination buffer}}
81 memcpy(dst+1, src+2, 2); // no-warning
88 memcpy(dst+2, src+2, 3); // expected-warning{{Memory copy function accesses out-of-bound array element}}
95 memcpy(dst+2, src+2, 2); // expected-warning{{Memory copy function overflows destination buffer}}
100 memcpy(a, a, 8); // expected-warning{{overlapping}}
105 memcpy(a+2, a+1, 8); // expected-warning{{overlapping}}
110 memcpy(a+1, a+2, 8); // expected-warning{{overlapping}}
115 memcpy(a+2, a+1, 4); // no-warning
116 memcpy(a+1, a+2, 4); // no-warning
121 memcpy(0, a, 4); // expected-warning{{Null pointer argument in call to memory copy function}}
126 memcpy(a, 0, 4); // expected-warning{{Null pointer argument in call to memory copy function}}
131 memcpy(0, a, 0); // no-warning
136 memcpy(a, 0, 0); // no-warning
141 if (memcpy(a, b, n) != a)
147 if (memcpy(a, 0, n) != a) // expected-warning{{Null pointer argument in call to memory copy function}}