MCPcopy Create free account
hub / github.com/F-Stack/f-stack / kcsan_strcmp

Function kcsan_strcmp

freebsd/kern/subr_csan.c:321–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321int
322kcsan_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
337size_t
338kcsan_strlen(const char *str)

Callers

nothing calls this directly

Calls 1

kcsan_accessFunction · 0.85

Tested by

no test coverage detected