Lines Matching refs:Ident
67 EXPECT_DEATH(Ident(strlen(str - 1)), LeftOOBReadMessage(oob_kind, 1)); in StrLenOOBTestTemplate()
68 EXPECT_DEATH(Ident(strlen(str - 5)), LeftOOBReadMessage(oob_kind, 5)); in StrLenOOBTestTemplate()
70 EXPECT_DEATH(Ident(strlen(str + length + 1)), in StrLenOOBTestTemplate()
75 EXPECT_DEATH(Ident(strlen(str)), RightOOBReadMessage(oob_kind, 0)); in StrLenOOBTestTemplate()
76 EXPECT_DEATH(Ident(strlen(str + length)), RightOOBReadMessage(oob_kind, 0)); in StrLenOOBTestTemplate()
82 size_t length = Ident(10); in TEST()
83 char *heap_string = Ident((char*)malloc(length + 1)); in TEST()
99 EXPECT_EQ(0U, wcslen(Ident(L""))); in TEST()
102 EXPECT_EQ(hello_len, wcslen(Ident(L"Hello, World!"))); in TEST()
103 wchar_t *heap_string = Ident((wchar_t*)malloc(hello_size)); in TEST()
105 EXPECT_EQ(hello_len, Ident(wcslen(heap_string))); in TEST()
106 EXPECT_DEATH(Ident(wcslen(heap_string + 14)), RightOOBReadMessage(0)); in TEST()
112 size_t size = Ident(123); in TEST()
115 Ident(strnlen(str - 1, 0)); in TEST()
116 Ident(strnlen(str, size)); in TEST()
117 Ident(strnlen(str + size - 1, 1)); in TEST()
119 Ident(strnlen(str, 2 * size)); in TEST()
121 EXPECT_DEATH(Ident(strnlen(str - 1, 1)), LeftOOBReadMessage(1)); in TEST()
122 EXPECT_DEATH(Ident(strnlen(str + size, 1)), RightOOBReadMessage(0)); in TEST()
125 EXPECT_DEATH(Ident(strnlen(str, size + 1)), RightOOBReadMessage(0)); in TEST()
131 size_t size = Ident(42); in TEST()
141 EXPECT_DEATH(Ident(strdup(str - 1)), LeftOOBReadMessage(1)); in TEST()
142 EXPECT_DEATH(Ident(strdup(str + size)), RightOOBReadMessage(0)); in TEST()
145 EXPECT_DEATH(Ident(strdup(str)), RightOOBReadMessage(0)); in TEST()
150 size_t to_size = Ident(30); in TEST()
151 size_t from_size = Ident(6); // less than to_size in TEST()
152 char *to = Ident((char*)malloc(to_size)); in TEST()
153 char *from = Ident((char*)malloc(from_size)); in TEST()
159 EXPECT_DEATH(Ident(strcpy(from, "hello2")), RightOOBWriteMessage(0)); in TEST()
161 EXPECT_DEATH(Ident(strcpy(to - 1, from)), LeftOOBWriteMessage(1)); in TEST()
162 EXPECT_DEATH(Ident(strcpy(to, from - 1)), LeftOOBReadMessage(1)); in TEST()
163 EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBReadMessage(0)); in TEST()
164 EXPECT_DEATH(Ident(strcpy(to + to_size, from)), RightOOBWriteMessage(0)); in TEST()
167 EXPECT_DEATH(Ident(strcpy(to, from)), RightOOBReadMessage(0)); in TEST()
173 size_t to_size = Ident(20); in TEST()
174 size_t from_size = Ident(6); // less than to_size in TEST()
175 char *to = Ident((char*)malloc(to_size)); in TEST()
177 char *from = Ident((char*)malloc(from_size)); in TEST()
188 EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)), in TEST()
190 EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)), in TEST()
192 EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)), in TEST()
194 EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)), in TEST()
197 EXPECT_DEATH(Ident(strncpy(to + to_size - from_size + 1, from, from_size)), in TEST()
199 EXPECT_DEATH(Ident(strncpy(to + 1, from, to_size)), in TEST()
206 EXPECT_DEATH(Ident(strncpy(to, from, to_size)), in TEST()
221 size_t size = Ident(100); in RunStrChrTestImpl()
229 EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1)); in RunStrChrTestImpl()
230 EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0)); in RunStrChrTestImpl()
233 EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0)); in RunStrChrTestImpl()
306 size_t size = Ident(100); in RunStrCmpTest()
313 Ident(StrCmp(s1, s2)); in RunStrCmpTest()
314 Ident(StrCmp(s1, s2 + size - 1)); in RunStrCmpTest()
315 Ident(StrCmp(s1 + size - 1, s2 + size - 1)); in RunStrCmpTest()
317 EXPECT_DEATH(Ident(StrCmp)(s1 - 1, s2), LeftOOBReadMessage(1)); in RunStrCmpTest()
318 EXPECT_DEATH(Ident(StrCmp)(s1, s2 - 1), LeftOOBReadMessage(1)); in RunStrCmpTest()
319 EXPECT_DEATH(Ident(StrCmp)(s1 + size, s2), RightOOBReadMessage(0)); in RunStrCmpTest()
320 EXPECT_DEATH(Ident(StrCmp)(s1, s2 + size), RightOOBReadMessage(0)); in RunStrCmpTest()
323 EXPECT_DEATH(Ident(StrCmp)(s1, s1), RightOOBReadMessage(0)); in RunStrCmpTest()
324 EXPECT_DEATH(Ident(StrCmp)(s1 + size - 1, s2), RightOOBReadMessage(0)); in RunStrCmpTest()
341 size_t size = Ident(100); in RunStrNCmpTest()
347 Ident(StrNCmp(s1, s2, size + 2)); in RunStrNCmpTest()
350 Ident(StrNCmp(s1 + size - 2, s2 + size - 2, size)); in RunStrNCmpTest()
352 Ident(StrNCmp(s1 - 1, s2 - 1, 0)); in RunStrNCmpTest()
353 Ident(StrNCmp(s1 + size - 1, s2 + size - 1, 1)); in RunStrNCmpTest()
355 EXPECT_DEATH(Ident(StrNCmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1)); in RunStrNCmpTest()
356 EXPECT_DEATH(Ident(StrNCmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1)); in RunStrNCmpTest()
357 EXPECT_DEATH(Ident(StrNCmp)(s1 + size, s2, 1), RightOOBReadMessage(0)); in RunStrNCmpTest()
358 EXPECT_DEATH(Ident(StrNCmp)(s1, s2 + size, 1), RightOOBReadMessage(0)); in RunStrNCmpTest()
360 EXPECT_DEATH(Ident(StrNCmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0)); in RunStrNCmpTest()
361 EXPECT_DEATH(Ident(StrNCmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0)); in RunStrNCmpTest()
378 size_t to_size = Ident(100); in TEST()
381 size_t from_size = Ident(20); in TEST()
413 size_t to_size = Ident(100); in TEST()
416 size_t from_size = Ident(20); in TEST()
452 size_t size = Ident(100); in TEST()
453 char *str = Ident((char*)malloc(size)); in TEST()
461 Ident(memcpy)(str + 1, str + 11, 10); in TEST()
462 Ident(memcpy)(str, str, 0); in TEST()
463 EXPECT_DEATH(Ident(memcpy)(str, str + 14, 15), OverlapErrorMessage("memcpy")); in TEST()
464 EXPECT_DEATH(Ident(memcpy)(str + 14, str, 15), OverlapErrorMessage("memcpy")); in TEST()
539 Ident(atoi(nptr)); in CallAtoi()
542 Ident(atol(nptr)); in CallAtol()
545 Ident(atoll(nptr)); in CallAtoll()
583 Ident(strtol(nptr, endptr, base)); in CallStrtol()
586 Ident(strtoll(nptr, endptr, base)); in CallStrtoll()