liyujie
2025-08-28 d9927380ed7c8366f762049be9f3fee225860833
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
 
// ftime() is deprecated on FreeBSD.
// XFAIL: freebsd
 
#include <assert.h>
#include <sys/timeb.h>
 
#include <sanitizer/msan_interface.h>
 
int main(void) {
  struct timeb tb;
  int res = ftime(&tb);
  assert(!res);
  assert(__msan_test_shadow(&tb, sizeof(tb)) == -1);
  return 0;
}