Darwin tests: grep --binary-files=text for laf-intel and skipping of unittests
MODIFY
GNUmakefile
GNUmakefile
@@ -252,7 +252,7 @@ help:
@echo "deepclean: cleans everything including downloads"
@echo "code-format: format the code, do this before you commit and send a PR please!"
@echo "tests: this runs the test framework. It is more catered for the developers, but if you run into problems this helps pinpointing the problem"
- @echo "unit: perform unit tests (based on cmocka)"
+ @echo "unit: perform unit tests (based on cmocka and GNU linker)"
@echo "document: creates afl-fuzz-document which will only do one run and save all manipulated inputs into out/queue/mutations"
@echo "help: shows these build options :-)"
@echo "=========================================="
@@ -385,8 +385,17 @@ unit_preallocable: test/unittests/unit_preallocable.o
unit_clean:
@rm -f ./test/unittests/unit_preallocable ./test/unittests/unit_list ./test/unittests/unit_maybe_alloc test/unittests/*.o
+ifneq "$(shell uname)" "Darwin"
+
unit: unit_maybe_alloc unit_preallocable unit_list unit_clean
+else
+
+unit:
+ @echo [-] unit tests are skipped on Darwin \(lacks GNU linker feature --wrap\)
+
+endif
+
code-format:
./.custom-format.py -i src/*.c
./.custom-format.py -i include/*.h

MODIFY
test/test.sh
test/test.sh
@@ -355,7 +355,7 @@ test -e ../afl-clang-fast -a -e ../split-switches-pass.so && {
}
AFL_DEBUG=1 AFL_LLVM_LAF_SPLIT_SWITCHES=1 AFL_LLVM_LAF_TRANSFORM_COMPARES=1 AFL_LLVM_LAF_SPLIT_COMPARES=1 ../afl-clang-fast -o test-compcov.compcov test-compcov.c > test.out 2>&1
test -e test-compcov.compcov && {
- grep -Eq " [ 12][0-9][0-9] location| [3-9][0-9] location" test.out && {
+ grep --binary-files=text -Eq " [ 12][0-9][0-9] location| [3-9][0-9] location" test.out && {
$ECHO "$GREEN[+] llvm_mode laf-intel/compcov feature works correctly"
} || {
$ECHO "$RED[!] llvm_mode laf-intel/compcov feature failed"

MODIFY
unicorn_mode/unicornafl
unicorn_mode/unicornafl
-Subproject commit 5833117abf55d54c4191ead81312764df03a48bc
+Subproject commit a5b79002ca18219c83f9aec4e71007917c6be2e0

Darwin tests: grep --binary-files=text for laf-intel and skipping of unittests