aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2017-03-04 15:45:43 -0800
committerMike Frysinger <vapier@gentoo.org>2021-04-16 15:21:59 -0400
commitd56b0a6dd878cd451ee258844fd70c2099cd19bd (patch)
tree096e4e6166fdc77a6867750704c1ea4f72dd95dc /paxinc.h
parentpaxldso: add support for "new" glibc cache format (diff)
downloadpax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.tar.gz
pax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.tar.bz2
pax-utils-d56b0a6dd878cd451ee258844fd70c2099cd19bd.zip
fuzz: add basic framework for using libFuzzer
By itself, this commit doesn't do anything useful. We have to update each tool to hook into libFuzzer, so we'll do that in follow up commits. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'paxinc.h')
-rw-r--r--paxinc.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/paxinc.h b/paxinc.h
index 6d433b9..620ad68 100644
--- a/paxinc.h
+++ b/paxinc.h
@@ -108,6 +108,12 @@ const char *strfileperms(const char *fname);
#define PTR_ALIGN_DOWN(base, size) ((__typeof__(base))ALIGN_DOWN((uintptr_t)(base), (size)))
#define PTR_ALIGN_UP(base, size) ((__typeof__(base))ALIGN_UP ((uintptr_t)(base), (size)))
+/* Support for libFuzzer: http://llvm.org/docs/LibFuzzer.html */
+#if PAX_UTILS_LIBFUZZ
+int LLVMFuzzerInitialize(__unused__ int *argc, __unused__ char ***argv);
+int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size);
+#endif
+
/* helper functions for showing errors */
extern const char *NORM, *RED, *YELLOW;
void color_init(bool disable);