• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // RUN: %clangxx_msan -O0 -g %s -lutil -o %t && %run %t
2 #include <assert.h>
3 #include <pty.h>
4 
5 #include <sanitizer/msan_interface.h>
6 
7 int
main(int argc,char ** argv)8 main (int argc, char** argv)
9 {
10   int master, slave;
11   openpty(&master, &slave, NULL, NULL, NULL);
12   assert(__msan_test_shadow(&master, sizeof(master)) == -1);
13   assert(__msan_test_shadow(&slave, sizeof(slave)) == -1);
14 
15   int master2;
16   forkpty(&master2, NULL, NULL, NULL);
17   assert(__msan_test_shadow(&master2, sizeof(master2)) == -1);
18 }
19