aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--afl-common.h1
-rw-r--r--llvm_mode/Makefile2
-rw-r--r--test-instr.c7
4 files changed, 8 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 5c5d7fb2..e6e3af85 100644
--- a/Makefile
+++ b/Makefile
@@ -161,7 +161,7 @@ test_build: afl-gcc afl-as afl-showmap
./afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
echo 1 | ./afl-showmap -m none -q -o .test-instr1 ./test-instr
@rm -f test-instr
- @cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <lcamtuf@google.com> to troubleshoot the issue."; echo; exit 1; fi
+ @cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/vanhauser-thc/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
@echo "[+] All right, the instrumentation seems to be working!"
else
diff --git a/afl-common.h b/afl-common.h
index 07afb75d..161caa39 100644
--- a/afl-common.h
+++ b/afl-common.h
@@ -1,5 +1,6 @@
#ifndef __AFLCOMMON_H
#define __AFLCOMMON_H
+#include "types.h"
void detect_file_args(char **argv, u8 *prog_in);
#endif
diff --git a/llvm_mode/Makefile b/llvm_mode/Makefile
index 8331b662..3923f8e3 100644
--- a/llvm_mode/Makefile
+++ b/llvm_mode/Makefile
@@ -177,7 +177,7 @@ test_build: $(PROGS)
../afl-showmap -m none -q -o .test-instr0 ./test-instr < /dev/null
echo 1 | ../afl-showmap -m none -q -o .test-instr1 ./test-instr
@rm -f test-instr
- @cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please ping <lcamtuf@google.com> to troubleshoot the issue."; echo; exit 1; fi
+ @cmp -s .test-instr0 .test-instr1; DR="$$?"; rm -f .test-instr0 .test-instr1; if [ "$$DR" = "0" ]; then echo; echo "Oops, the instrumentation does not seem to be behaving correctly!"; echo; echo "Please post to https://github.com/vanhauser-thc/AFLplusplus/issues to troubleshoot the issue."; echo; exit 1; fi
@echo "[+] All right, the instrumentation seems to be working!"
all_done: test_build
diff --git a/test-instr.c b/test-instr.c
index 1b978c55..9107f15e 100644
--- a/test-instr.c
+++ b/test-instr.c
@@ -20,9 +20,12 @@
int main(int argc, char** argv) {
- char buf[8];
+ char buff[8];
+ char *buf = buff;
- if (read(0, buf, sizeof(buf)) < 1) {
+ if (argc > 1)
+ buf = argv[1];
+ else if (read(0, buf, sizeof(buf)) < 1) {
printf("Hum?\n");
exit(1);
}