about summary refs log tree commit diff
path: root/unicorn_mode/samples/persistent
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-12 11:04:18 +0200
committerGitHub <noreply@github.com>2020-05-12 11:04:18 +0200
commit1317433a51a7f7336c82c80a592835ddda9ef60f (patch)
treee623506f1d0a8771c3fc266eed0a75b626a88724 /unicorn_mode/samples/persistent
parentbdd2a412c476cbd5aea0fff67ef096305815953b (diff)
parenta578d719e1f556db07ca3c7e2fe38b7668c204d8 (diff)
downloadafl++-1317433a51a7f7336c82c80a592835ddda9ef60f.tar.gz
Merge pull request #359 from AFLplusplus/dev
push to master
Diffstat (limited to 'unicorn_mode/samples/persistent')
-rw-r--r--unicorn_mode/samples/persistent/COMPILE.md4
-rw-r--r--unicorn_mode/samples/persistent/Makefile9
2 files changed, 8 insertions, 5 deletions
diff --git a/unicorn_mode/samples/persistent/COMPILE.md b/unicorn_mode/samples/persistent/COMPILE.md
index 781f15c0..111dfc54 100644
--- a/unicorn_mode/samples/persistent/COMPILE.md
+++ b/unicorn_mode/samples/persistent/COMPILE.md
@@ -1,6 +1,6 @@
 # C Sample
 
-This shows a simple persistent harness for unicornafl in C
+This shows a simple persistent harness for unicornafl in C.
 In contrast to the normal c harness, this harness manually resets the unicorn state on each new input.
 Thanks to this, we can rerun the testcase in unicorn multiple times, without the need to fork again.
 
@@ -21,4 +21,4 @@ was built in case you want to rebuild it or recompile it for any reason.
 
 The pre-built binary (persistent_target_x86_64.bin) was built using -g -O0 in gcc.
 
-We then load the binary we execute the main function directly.
+We then load the binary and we execute the main function directly.
diff --git a/unicorn_mode/samples/persistent/Makefile b/unicorn_mode/samples/persistent/Makefile
index 9c7ed7aa..9596facc 100644
--- a/unicorn_mode/samples/persistent/Makefile
+++ b/unicorn_mode/samples/persistent/Makefile
@@ -17,9 +17,9 @@ CFLAGS += -Wall -Werror -I../../unicornafl/include
 
 LDFLAGS += -L$(LIBDIR) -lpthread -lm
 
-_LRT = $(_UNIQ)$(UNAME_S:Linux=)
-__LRT = $(_LRT:$(_UNIQ)=-lrt)
-LRT = $(__LRT:$(_UNIQ)=)
+_LRT = $(_UNIQ)$(UNAME_S)
+__LRT = $(_LRT:$(_UNIQ)Linux=-lrt)
+LRT = $(__LRT:$(_UNIQ)$(UNAME_S)=)
 
 LDFLAGS += $(LRT)
 
@@ -48,3 +48,6 @@ debug: harness-debug.o
 
 fuzz: harness
 	../../../afl-fuzz -m none -i sample_inputs -o out -- ./harness @@
+
+debugmake:
+	@echo UNAME_S=$(UNAME_S), _LRT=$(_LRT), __LRT=$(__LRT), LRT=$(LRT)