[PATCH] [compiler-rt] Add a symbolizer testcase for closed stdin/stdout
Alexey Samsonov
vonosmas at gmail.com
Wed Mar 4 12:26:04 PST 2015
Good idea
================
Comment at: test/asan/TestCases/closed-fds.cc:18
@@ +17,3 @@
+ close(STDERR_FILENO);
+ fprintf(stderr, "Can you hear me now?\n");
+ char *x = (char*)malloc(10 * sizeof(char));
----------------
Maybe, we should instead check fprintf return value?
================
Comment at: test/asan/TestCases/closed-fds.cc:25
@@ +24,3 @@
+
+// CHECK-OUTPUT: Closing streams.
+// CHECK-OUTPUT-NOT: Can you hear me now?
----------------
Interleave CHECK lines with code...
================
Comment at: test/asan/TestCases/closed-fds.cc:30
@@ +29,2 @@
+// CHECK-FILE: {{WRITE of size 1 at 0x.* thread T0}}
+// CHECK-FILE: {{ #0 0x.* in main .*closed-fds.cc:}}[[@LINE-9]]
----------------
to make this block actually close to the //BOOM line
http://reviews.llvm.org/D7973
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list