From dcf7d85cba9a8ee5a33cff578fe48bdbccda1a3d Mon Sep 17 00:00:00 2001 From: van Hauser Date: Mon, 9 Mar 2020 10:56:53 +0100 Subject: honor no_quiet for missing llvm_mode output, also print to stderr with afl-*-rt.o.c instead of stdout for errors plus two potential bad free() fixes --- gcc_plugin/afl-gcc-rt.o.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc_plugin/afl-gcc-rt.o.c') diff --git a/gcc_plugin/afl-gcc-rt.o.c b/gcc_plugin/afl-gcc-rt.o.c index 508d4441..77bb5325 100644 --- a/gcc_plugin/afl-gcc-rt.o.c +++ b/gcc_plugin/afl-gcc-rt.o.c @@ -94,7 +94,7 @@ static void __afl_map_shm(void) { shm_fd = shm_open(shm_file_path, O_RDWR, 0600); if (shm_fd == -1) { - printf("shm_open() failed\n"); + fprintf(stderr, "shm_open() failed\n"); exit(1); } @@ -106,7 +106,7 @@ static void __afl_map_shm(void) { close(shm_fd); shm_fd = -1; - printf("mmap() failed\n"); + fprintf(stderr, "mmap() failed\n"); exit(2); } -- cgit 1.4.1