about summary refs log tree commit diff
path: root/src/afl-cc.c
AgeCommit message (Collapse)Author
2023-12-10nitvanhauser-thc
2023-12-07afl-cc fixesvanhauser-thc
2023-12-05fixing -Wl,-rpath=<LLVM_LIBDIR>vincenzo MEZZELA
2023-12-04removing options "-Wl,-rpath" "LLVM_LIBDIR" when using gccvincenzo MEZZELA
2023-10-24code formatvanhauser-thc
2023-10-23Add an env to afl-clang-fast to disable setting rpath if LLVM path isn'tJesse Schwartzentruber
recognized
2023-09-27fix afl-cc help outputvanhauser-thc
2023-08-31nitvanhauser-thc
2023-07-05update llvm recommendationsvanhauser-thc
2023-07-04nitsvanhauser-thc
2023-07-03Fix max_params define.Eli Kobrin
2023-06-27Increase the number of afl-cc supported paramsSiqi Chen
2023-06-01rewrote PCGUARDvanhauser-thc
2023-05-23response file fixvanhauser-thc
2023-05-23allow llvm_instrument nativevanhauser-thc
2023-05-21code formatvanhauser-thc
2023-05-12add @responsefile support for afl-ccvanhauser-thc
2023-05-12afl-clang-lto incomptable with -flto=thinvanhauser-thc
2023-04-28doc, code formatvanhauser-thc
2023-04-28Source Code Coverage support for Nyx (Part 1) (#1720)Christian Holler (:decoder)
* Additional source code reformatting in afl-compiler-rt * Add source code coverage support to afl-compiler-rt (for use with Nyx)
2023-04-27afl++ -> AFL++vanhauser-thc
2023-04-24document new env varKeno Hassler
2023-04-10afl-cc: Don't offer __AFL_INIT() etc. in GCC/CLANG modesJonathan Neuschäfer
instrumentation/README.persistent_mode.md documents in the section about deferred forkserver initialization: > With the location selected, add this code in the appropriate spot: > > ```c > #ifdef __AFL_HAVE_MANUAL_CONTROL > __AFL_INIT(); > #endif > ``` > > You don't need the #ifdef guards, but including them ensures that the program > will keep working normally when compiled with a tool other than afl-clang-fast/ > afl-clang-lto/afl-gcc-fast. > > Finally, recompile the program with afl-clang-fast/afl-clang-lto/afl-gcc-fast > (afl-gcc or afl-clang will *not* generate a deferred-initialization binary) - > and you should be all set! This strongly implies that you can compile a program that uses __AFL_INIT() under an `#ifdef __AFL_HAVE_MANUAL_CONTROL` guard with afl-gcc/-clang. However, this currently fails: $ cat example.c #include <stdio.h> int main(void) { #ifdef __AFL_HAVE_MANUAL_CONTROL __AFL_INIT(); #endif puts("Hello"); } $ afl-gcc example.c -o example afl-cc++4.06a by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: GCC-GCC [!] WARNING: You are using outdated instrumentation, install LLVM and/or gcc-plugin and use afl-clang-fast/afl-clang-lto/afl-gcc-fast instead! afl-as++4.06a by Michal Zalewski [+] Instrumented 1 locations (64-bit, non-hardened mode, ratio 100%). /usr/bin/ld: /tmp/ccuJHcpt.o: in function `main': /home/jn/dev/fuzz/AFLplusplus/example.c:5: undefined reference to `__afl_manual_init' collect2: error: ld returned 1 exit status The issue here is an inconsistency in afl-gcc (i.e. afl-cc operating in GCC mode): - afl-cc defines __AFL_HAVE_MANUAL_CONTROL and __AFL_INIT unconditionally - __AFL_INIT relies on __afl_manual_init, which is defined in afl-compiler-rt.o - afl-cc doesn't link afl-compiler-rt in GCC or CLANG mode Since afl-gcc/-clang is documented as not supporting deferred forkserver initialization, this patch omits the definitions of __AFL_HAVE_MANUAL_CONTROL and related macros in GCC/CLANG mode. This restores the ability to compile a deferred-forkserver program under afl-gcc, if it can also be compiled under gcc. [ In case someone reads this an feels adventurous enough (as I did) to think about enabling deferred forkserver under afl-gcc: Whether the deferred forkserver actually works can be verified by placing a usleep(100000) or similar at the start of main (before __AFL_INIT()), and watching the execution speed. It doesn't work. ]
2023-04-08afl-cc: Avoid casts of string literals to char*, in definition of ↵Jonathan Neuschäfer
__AFL_INIT() etc. With the right -W options, compilers may complain about the cast of string literals (for PERSIST_SIG and DEFER_SIG) to (char*), and they're right to do so, because string literals are constant. Since some projects enable -Werror, this can lead to a broken build with afl-cc. Let's simply cast to (const char *), which preserves the constness of the string literal.
2023-02-13AFL_LLVM_DICT2FILE_NO_MAIN supportvanhauser-thc
2023-01-23nitvanhauser-thc
2023-01-23add CFI variant for gccvanhauser-thc
2023-01-03welcome 2023vanhauser-thc
2022-11-10Merge pull request #1576 from AFLplusplus/persistent_mode_alwaysvan Hauser
Persistent mode always
2022-11-10more llvm16 fixesvanhauser-thc
2022-11-10try llvm 16 fixvanhauser-thc
2022-11-09Didn't mean to change thatDominik Maier
2022-11-09fmtDominik Maier
2022-11-09Always enable persistent mode, no env/bincheck neededDominik Maier
2022-10-20Fix -rpath argumentEdward J. Schwartz
2022-10-07auto shmem fuzzing (#1541)van Hauser
* auto shmem fuzzing * print warning when forcing shmem fuzzing * typos * Shmem always * typo fix * fixes Co-authored-by: Dominik Maier <dmnk@google.com>
2022-09-17fix docsvanhauser-thc
2022-09-14Fix loading and registeration of LTO pass for new pass managerNikita Popov
2022-08-25fix gcc_mode cmplogvanhauser-thc
2022-08-19add malloc checkvanhauser-thc
2022-08-15filter pipe in gcc_modevanhauser-thc
2022-08-14better handling of -fsanitize=..,...,.. listsvanhauser-thc
2022-07-12clang format 14vanhauser-thc
2022-07-07fix double free on exit for -c 0 on src cmplogvanhauser-thc
2022-07-04cmplog support for gcc_plugin by adacorevanhauser-thc
2022-06-20nitsvanhauser-thc
2022-04-25code formatvanhauser-thc
2022-04-20fix instrumentation for -Werror,-Wunused-but-set-variableJesse Schwartzentruber
`used` is so it isn't optimized out. `unused` is to avoid the warning.
2022-04-20use passthrough mode for wasmJesse Schwartzentruber
2022-03-31Some scan-build fixesDominik Maier