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
);
24 bool_t res
= xdr_bytes(&xdrs
, &sp
, &sz
, sizeof(s
));
25 // CHECK: MemorySanitizer: use-of-uninitialized-value
26 // CHECK: {{in main.*sunrpc_bytes.cpp:}}[[@LINE-2]]
30 xdrmem_create(&xdrs
, buf
, sizeof(buf
), XDR_DECODE
);
34 res
= xdr_bytes(&xdrs
, &sp2
, &sz2
, sizeof(s2
));
37 assert(strcmp(s
, s2
) == 0);