aboutsummaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Posix/freopen.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/TestCases/Posix/freopen.cc')
-rw-r--r--test/asan/TestCases/Posix/freopen.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/asan/TestCases/Posix/freopen.cc b/test/asan/TestCases/Posix/freopen.cc
new file mode 100644
index 000000000000..c137abb8fcb8
--- /dev/null
+++ b/test/asan/TestCases/Posix/freopen.cc
@@ -0,0 +1,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;
+}