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

This commit is contained in:
van Hauser
2020-03-09 10:56:53 +01:00
parent 8e953d9931
commit dcf7d85cba
9 changed files with 30 additions and 22 deletions

View File

@ -30,6 +30,7 @@ CFLAGS ?= -O3 -g -funroll-loops
CFLAGS += -Wall -I../include -D_FORTIFY_SOURCE=2 -Wno-pointer-sign \
-DAFL_PATH=\"$(HELPER_PATH)\" -DBIN_PATH=\"$(BIN_PATH)\" \
-DGCC_VERSION=\"$(GCCVER)\" -DGCC_BINDIR=\"$(GCCBINDIR)\" \
-Wno-unused-function
CXXFLAGS ?= -O3 -g -funroll-loops
CXXEFLAGS := $(CXXFLAGS) -Wall -D_FORTIFY_SOURCE=2

View File

@ -361,7 +361,9 @@ int main(int argc, char** argv, char** envp) {
}
}
} else
be_quiet = 1;
check_environment_vars(envp);

View File

@ -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);
}