about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-08-02 10:15:13 +0200
committervanhauser-thc <vh@thc.org>2021-08-02 10:15:13 +0200
commit8ad6e7c1404be214ea25692cbd9093aad3dff9ae (patch)
tree96db1a3ee30be0b8f6fdc241cc93ee5817ca3959
parent382439b58fa81cb529188649a30e5c95b084a404 (diff)
downloadafl++-8ad6e7c1404be214ea25692cbd9093aad3dff9ae.tar.gz
fix afl_preload issues on macos
-rw-r--r--docs/Changelog.md1
-rw-r--r--docs/INSTALL.md2
-rw-r--r--src/afl-fuzz.c5
3 files changed, 5 insertions, 3 deletions
diff --git a/docs/Changelog.md b/docs/Changelog.md
index 10d25754..d397a764 100644
--- a/docs/Changelog.md
+++ b/docs/Changelog.md
@@ -17,6 +17,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
     configuration settings for fuzzing, for Linux and Macos.
     thanks to jhertz!
   - added xml, curl and exotic string functions to llvm dictionary features
+  - fix AFL_PRELOAD issues on MacOS
   - removed utils/afl_frida because frida_mode/ is now so much better
 
 
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index b3f9fb96..17af532a 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -74,7 +74,7 @@ and depend mostly on user feedback.
 To build AFL, install llvm (and perhaps gcc) from brew and follow the general
 instructions for Linux. If possible avoid Xcode at all cost.
 
-`brew install wget git make cmake llvm`
+`brew install wget git make cmake llvm gdb`
 
 Be sure to setup PATH to point to the correct clang binaries and use the
 freshly installed clang, clang++ and gmake, e.g.:
diff --git a/src/afl-fuzz.c b/src/afl-fuzz.c
index b6da5a72..c97427e1 100644
--- a/src/afl-fuzz.c
+++ b/src/afl-fuzz.c
@@ -1398,6 +1398,9 @@ int main(int argc, char **argv_orig, char **envp) {
 
   afl->fsrv.use_fauxsrv = afl->non_instrumented_mode == 1 || afl->no_forkserver;
 
+  check_crash_handling();
+  check_cpu_governor(afl);
+
   if (getenv("LD_PRELOAD")) {
 
     WARNF(
@@ -1498,8 +1501,6 @@ int main(int argc, char **argv_orig, char **envp) {
 
   }
 
-  check_crash_handling();
-  check_cpu_governor(afl);
 
   get_core_count(afl);