3 // RUN: %clangxx_msan -g -O0 %s -o %t && \
5 // RUN: %clangxx_msan -g -O0 -DUNINIT=1 %s -o %t && \
6 // RUN: not %run %t 2>&1 | FileCheck %s
12 #include <sanitizer/msan_interface.h>
14 int main(int argc
, char *argv
[]) {
17 xdrmem_create(&xdrs
, buf
, sizeof(buf
), XDR_ENCODE
);
23 bool_t res
= xdr_string(&xdrs
, &sp
, sizeof(s
));
24 // CHECK: MemorySanitizer: use-of-uninitialized-value
25 // CHECK: {{in main.*sunrpc_string.cpp:}}[[@LINE-2]]
29 xdrmem_create(&xdrs
, buf
, sizeof(buf
), XDR_DECODE
);
32 res
= xdr_string(&xdrs
, &sp2
, sizeof(s2
));
34 assert(strcmp(s
, s2
) == 0);