summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Posix/freopen.cpp
blob: c137abb8fcb81b9530c2d9c81e25054d09b832fd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// RUN: %clangxx_asan -O0 %s -o %t && %run %t

// This fails on i386 Linux due to a glibc versioned symbols mixup.
// REQUIRES: asan-64-bits

#include <assert.h>
#include <stdio.h>

int main() {
  FILE *fp = fopen("/dev/null", "w");
  assert(fp);
  freopen(NULL, "a", fp);
  fclose(fp);
  return 0;
}