about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-04-14 16:09:55 +0200
committervanhauser-thc <vh@thc.org>2023-04-14 16:09:55 +0200
commit0c4f0dd4c483ec3cf481958c6b22c2b43b365cef (patch)
treebd3fbfe119c89b9d20b4c71fad19eb6e0e4b839c
parentb5f7f42cd0a1bce83c8c6d4af9846e7c5da3cdd1 (diff)
downloadafl++-0c4f0dd4c483ec3cf481958c6b22c2b43b365cef.tar.gz
oss-fuzz fix for LLVMFuzzerTestOneInput driver
-rw-r--r--utils/aflpp_driver/aflpp_driver.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/aflpp_driver/aflpp_driver.c b/utils/aflpp_driver/aflpp_driver.c
index 19f0d9da..00a94b9c 100644
--- a/utils/aflpp_driver/aflpp_driver.c
+++ b/utils/aflpp_driver/aflpp_driver.c
@@ -74,7 +74,10 @@ extern unsigned char *__afl_area_ptr;
 extern unsigned int   __afl_map_size;
 
 // libFuzzer interface is thin, so we don't include any libFuzzer headers.
-__attribute__((weak)) int LLVMFuzzerTestOneInput(const uint8_t *Data,
+/* Using the weak attributed on LLVMFuzzerTestOneInput() breaks oss-fuzz but
+   on the other hand this is what Google needs to make LLVMFuzzerRunDriver()
+   work. Choose your poison Google! */
+/*__attribute__((weak))*/ int LLVMFuzzerTestOneInput(const uint8_t *Data,
                                                  size_t         Size);
 __attribute__((weak)) int LLVMFuzzerInitialize(int *argc, char ***argv);
 __attribute__((weak)) int LLVMFuzzerRunDriver(