1 // RUN: %clangxx_msan -O0 -g %s -lutil -o %t && %run %t
8 #include <sanitizer/msan_interface.h>
11 main (int argc
, char** argv
)
14 openpty(&parent
, &worker
, NULL
, NULL
, NULL
);
15 assert(__msan_test_shadow(&parent
, sizeof(parent
)) == -1);
16 assert(__msan_test_shadow(&worker
, sizeof(worker
)) == -1);
19 ttyname_r(parent
, name
, sizeof(name
));
20 assert(__msan_test_shadow(name
, strlen(name
) + 1) == -1);
22 char *name_p
= ttyname(parent
);
23 assert(__msan_test_shadow(name_p
, strlen(name_p
) + 1) == -1);
26 forkpty(&parent2
, NULL
, NULL
, NULL
);
27 assert(__msan_test_shadow(&parent2
, sizeof(parent2
)) == -1);