summaryrefslogtreecommitdiff
path: root/test/tsan/malloc_overflow.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:45:36 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:45:36 +0000
commit6f08730ec5f639f05f2f15354171e4a3c9af9dc1 (patch)
tree7374e9d4448083010ada98d17976199c7e945d47 /test/tsan/malloc_overflow.cc
parentc003a57e2e4a1ad9be0338806bc1038b6987155f (diff)
Notes
Diffstat (limited to 'test/tsan/malloc_overflow.cc')
-rw-r--r--test/tsan/malloc_overflow.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/tsan/malloc_overflow.cc b/test/tsan/malloc_overflow.cc
index b2f9b0f57798a..3db412978d040 100644
--- a/test/tsan/malloc_overflow.cc
+++ b/test/tsan/malloc_overflow.cc
@@ -6,17 +6,17 @@
int main() {
void *p = malloc((size_t)-1);
if (p != 0)
- printf("FAIL malloc(-1) = %p\n", p);
+ fprintf(stderr, "FAIL malloc(-1) = %p\n", p);
p = malloc((size_t)-1 / 2);
if (p != 0)
- printf("FAIL malloc(-1/2) = %p\n", p);
+ fprintf(stderr, "FAIL malloc(-1/2) = %p\n", p);
p = calloc((size_t)-1, (size_t)-1);
if (p != 0)
- printf("FAIL calloc(-1, -1) = %p\n", p);
+ fprintf(stderr, "FAIL calloc(-1, -1) = %p\n", p);
p = calloc((size_t)-1 / 2, (size_t)-1 / 2);
if (p != 0)
- printf("FAIL calloc(-1/2, -1/2) = %p\n", p);
- printf("OK\n");
+ fprintf(stderr, "FAIL calloc(-1/2, -1/2) = %p\n", p);
+ fprintf(stderr, "OK\n");
}
// CHECK-NOT: FAIL