| 319 | } |
| 320 | |
| 321 | int |
| 322 | kcsan_strcmp(const char *s1, const char *s2) |
| 323 | { |
| 324 | while (1) { |
| 325 | kcsan_access((uintptr_t)s1, 1, false, false, __RET_ADDR); |
| 326 | kcsan_access((uintptr_t)s2, 1, false, false, __RET_ADDR); |
| 327 | if (*s1 != *s2) |
| 328 | break; |
| 329 | if (*s1 == '\0') |
| 330 | return 0; |
| 331 | s1++, s2++; |
| 332 | } |
| 333 | |
| 334 | return (*(const unsigned char *)s1 - *(const unsigned char *)s2); |
| 335 | } |
| 336 | |
| 337 | size_t |
| 338 | kcsan_strlen(const char *str) |
nothing calls this directly
no test coverage detected