aboutsummaryrefslogtreecommitdiff
path: root/include/forkserver.h
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2019-09-03 11:12:49 +0200
committerGitHub <noreply@github.com>2019-09-03 11:12:49 +0200
commitf3617bd83bcf4de3b10866faca4b83f566ee0e8f (patch)
tree6308bf840cdf24af50fdef4c216d6c9433cd021b /include/forkserver.h
parent3bfd88aabbf3fdf70cb053aa25944f32d2113d8f (diff)
parentd47ef88fcd842bd13923b1b519544fa2c8d6d0eb (diff)
downloadafl++-f3617bd83bcf4de3b10866faca4b83f566ee0e8f.tar.gz
Merge pull request #53 from vanhauser-thc/code-cleanup
Code cleanup
Diffstat (limited to 'include/forkserver.h')
-rw-r--r--include/forkserver.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/forkserver.h b/include/forkserver.h
new file mode 100644
index 00000000..af5dab72
--- /dev/null
+++ b/include/forkserver.h
@@ -0,0 +1,25 @@
+#ifndef __AFL_FORKSERVER_H
+#define __AFL_FORKSERVER_H
+
+void handle_timeout(int sig);
+void init_forkserver(char **argv);
+
+#ifdef __APPLE__
+# define MSG_FORK_ON_APPLE \
+ " - On MacOS X, the semantics of fork() syscalls are non-standard and " \
+ "may\n" \
+ " break afl-fuzz performance optimizations when running " \
+ "platform-specific\n" \
+ " targets. To fix this, set AFL_NO_FORKSRV=1 in the environment.\n\n"
+#else
+# define MSG_FORK_ON_APPLE ""
+#endif
+
+#ifdef RLIMIT_AS
+# define MSG_ULIMIT_USAGE " ( ulimit -Sv $[%llu << 10];"
+#else
+# define MSG_ULIMIT_USAGE " ( ulimit -Sd $[%llu << 10];"
+#endif /* ^RLIMIT_AS */
+
+#endif
+