1 // RUN: %clangxx_msan -O0 -g %s -o %t && %run %t 2 3 #ifndef __FreeBSD__ 4 #include <utmp.h> 5 #endif 6 #include <utmpx.h> 7 #include <sanitizer/msan_interface.h> 8 main(void)9int main(void) { 10 #ifndef __FreeBSD__ 11 setutent(); 12 while (struct utmp *ut = getutent()) 13 __msan_check_mem_is_initialized(ut, sizeof(*ut)); 14 endutent(); 15 #endif 16 17 setutxent(); 18 while (struct utmpx *utx = getutxent()) 19 __msan_check_mem_is_initialized(utx, sizeof(*utx)); 20 endutxent(); 21 } 22