1 // RUN: %clangxx_msan -m64 -O0 %s -o %t && not %run %t >%t.out 2>&1
2 // RUN: FileCheck %s < %t.out
3 // RUN: %clangxx_msan -m64 -O3 %s -o %t && not %run %t >%t.out 2>&1
4 // RUN: FileCheck %s < %t.out
7 #include <sys/socket.h>
16 int res
= getaddrinfo("localhost", NULL
, NULL
, &ai
);
18 res
= getaddrinfo("localhost", NULL
, &hint
, &ai
);
19 // CHECK: Uninitialized bytes in __interceptor_getaddrinfo at offset 0 inside [0x{{.*}}, 48)
20 // CHECK: WARNING: MemorySanitizer: use-of-uninitialized-value
21 // CHECK: #0 {{.*}} in main {{.*}}getaddrinfo-positive.cc:[[@LINE-3]]