about summary refs log tree commit diff
path: root/frida_mode/test/sqlite
diff options
context:
space:
mode:
authorYour Name <you@example.com>2021-08-20 17:28:40 +0100
committerYour Name <you@example.com>2021-08-20 17:28:40 +0100
commit028f8ced8f772d82a7efc522ec629bf4a5fff32d (patch)
treef5440087d2779984812b5e8c50f1fda6bdbb489b /frida_mode/test/sqlite
parent3513ba2e51222151945e8ae87236bb9d2f07f37a (diff)
downloadafl++-028f8ced8f772d82a7efc522ec629bf4a5fff32d.tar.gz
Fixed coverage on OSX (dependency on pipe2)
Removed use of 'realpath' in makefiles to fix OSX incompatibility
Fixed handling of when prefetching should be enabled
Snap the main binary during initialization to avoid stability issues with lazy loading
Add support for configurable inline cache entries for FRIDA on x86/x64
Support for prefetching FRIDA backpatches on x86/x64
Improved stats support on x86/x64/aarch64
Diffstat (limited to 'frida_mode/test/sqlite')
-rw-r--r--frida_mode/test/sqlite/GNUmakefile20
1 files changed, 18 insertions, 2 deletions
diff --git a/frida_mode/test/sqlite/GNUmakefile b/frida_mode/test/sqlite/GNUmakefile
index 1c856d1e..85f213a9 100644
--- a/frida_mode/test/sqlite/GNUmakefile
+++ b/frida_mode/test/sqlite/GNUmakefile
@@ -1,5 +1,5 @@
 PWD:=$(shell pwd)/
-ROOT:=$(shell realpath $(PWD)../../..)/
+ROOT:=$(PWD)../../../
 BUILD_DIR:=$(PWD)build/
 
 SQLITE_BUILD_DIR:=$(BUILD_DIR)sqlite/
@@ -120,7 +120,7 @@ sqlite: $(SQLITE_TEST_DIR) $(TEST_BIN)
 ########## DUMMY #######
 
 $(AFLPP_DRIVER_DUMMY_INPUT): | $(SQLITE_TEST_DIR)
-	dd if=/dev/zero bs=1M count=1 of=$@
+	dd if=/dev/zero bs=1048576 count=1 of=$@
 
 ###### TEST DATA #######
 
@@ -156,6 +156,22 @@ frida: $(TEST_BIN) $(AFLPP_FRIDA_DRIVER_HOOK_OBJ) $(AFLPP_DRIVER_DUMMY_INPUT) |
 		-- \
 			$(TEST_BIN) $(AFLPP_DRIVER_DUMMY_INPUT)
 
+frida_slow: $(TEST_BIN) $(AFLPP_FRIDA_DRIVER_HOOK_OBJ) $(AFLPP_DRIVER_DUMMY_INPUT) | $(SQLITE_TEST_DIR)
+	AFL_FRIDA_PERSISTENT_CNT=1000000 \
+	AFL_FRIDA_PERSISTENT_HOOK=$(AFLPP_FRIDA_DRIVER_HOOK_OBJ) \
+	AFL_FRIDA_PERSISTENT_ADDR=$(AFL_FRIDA_PERSISTENT_ADDR) \
+	AFL_ENTRYPOINT=$(AFL_FRIDA_PERSISTENT_ADDR) \
+	AFL_FRIDA_STALKER_IC_ENTRIES=2 \
+	AFL_FRIDA_INST_NO_PREFETCH_BACKPATCH=1 \
+	$(ROOT)afl-fuzz \
+		-D \
+		-V 30 \
+		-O \
+		-i $(SQLITE_TEST_DIR) \
+		-o $(FRIDA_OUT) \
+		-- \
+			$(TEST_BIN) $(AFLPP_DRIVER_DUMMY_INPUT)
+
 debug:
 	gdb \
 		--ex 'set environment LD_PRELOAD=$(ROOT)afl-frida-trace.so' \