mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-22 06:18:04 +00:00
LLVM 17 bug workaround
This commit is contained in:
9
TODO.md
9
TODO.md
@ -10,6 +10,15 @@
|
|||||||
- when trimming then perform crash detection
|
- when trimming then perform crash detection
|
||||||
- either -L0 and/or -p mmopt results in zero new coverage
|
- either -L0 and/or -p mmopt results in zero new coverage
|
||||||
|
|
||||||
|
afl-clang-fast -Iapps -I. -Iinclude -Iapps/include -pthread -m64 -fsanitize=address -fno-omit-frame-pointer -g -Wa,--noexecstack -Qunused-arguments -fno-inline-functions -g -pthread -Wno-unused-command-line-argument -O3 -fno-sanitize=alignment -DOPENSSL_BUILDING_OPENSSL -DPEDANTIC -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -MMD -MF apps/openssl-bin-speed.d.tmp -MT apps/openssl-bin-speed.o -c -o apps/openssl-bin-speed.o apps/speed.c
|
||||||
|
afl-cc++4.10a by Michal Zalewski, Laszlo Szekeres, Marc Heuse - mode: LLVM-PCGUARD
|
||||||
|
Split-compare-newpass by laf.intel@gmail.com, extended by heiko@hexco.de (splitting icmp to 8 bit)
|
||||||
|
Split-floatingpoint-compare-pass: 2 FP comparisons split
|
||||||
|
724 comparisons found
|
||||||
|
SanitizerCoveragePCGUARD++4.10a
|
||||||
|
[+] Instrumented 7356 locations with no collisions (non-hardened mode) of which are 99 handled and 7 unhandled selects.
|
||||||
|
|
||||||
|
|
||||||
## Should
|
## Should
|
||||||
|
|
||||||
<<<<<<< Updated upstream
|
<<<<<<< Updated upstream
|
||||||
|
@ -11,6 +11,11 @@
|
|||||||
reporting!
|
reporting!
|
||||||
- instrumentation:
|
- instrumentation:
|
||||||
- LLVM 18 support, thanks to @devnexen!
|
- LLVM 18 support, thanks to @devnexen!
|
||||||
|
- compcov/LAF-intel:
|
||||||
|
- floating point splitting bug fix by @hexcoder
|
||||||
|
- due a bug in LLVM 17 integer splitting is disabled!
|
||||||
|
- when splitting floats was selected, integers were always split as well,
|
||||||
|
fixed to require AFL_LLVM_LAF_SPLIT_COMPARES as it should
|
||||||
|
|
||||||
|
|
||||||
### Version ++4.09c (release)
|
### Version ++4.09c (release)
|
||||||
|
@ -952,6 +952,7 @@ bool ModuleSanitizerCoverageAFL::InjectCoverage(
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// fprintf(stderr, "UNHANDLED: %u\n", t->getTypeID());
|
||||||
unhandled++;
|
unhandled++;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -1707,12 +1707,6 @@ bool SplitComparesTransform::runOnModule(Module &M) {
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *bitw_env = getenv("AFL_LLVM_LAF_SPLIT_COMPARES_BITW");
|
|
||||||
if (!bitw_env) bitw_env = getenv("LAF_SPLIT_COMPARES_BITW");
|
|
||||||
if (bitw_env) { target_bitwidth = atoi(bitw_env); }
|
|
||||||
|
|
||||||
enableFPSplit = getenv("AFL_LLVM_LAF_SPLIT_FLOATS") != NULL;
|
|
||||||
|
|
||||||
if ((isatty(2) && getenv("AFL_QUIET") == NULL) ||
|
if ((isatty(2) && getenv("AFL_QUIET") == NULL) ||
|
||||||
getenv("AFL_DEBUG") != NULL) {
|
getenv("AFL_DEBUG") != NULL) {
|
||||||
|
|
||||||
@ -1728,6 +1722,27 @@ bool SplitComparesTransform::runOnModule(Module &M) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *bitw_env = getenv("AFL_LLVM_LAF_SPLIT_COMPARES_BITW");
|
||||||
|
if (!bitw_env) bitw_env = getenv("LAF_SPLIT_COMPARES_BITW");
|
||||||
|
if (bitw_env) { target_bitwidth = atoi(bitw_env); }
|
||||||
|
|
||||||
|
if (getenv("AFL_LLVM_LAF_SPLIT_FLOATS")) { enableFPSplit = true; }
|
||||||
|
|
||||||
|
bool split_comp = false;
|
||||||
|
|
||||||
|
if (getenv("AFL_LLVM_LAF_SPLIT_COMPARES")) {
|
||||||
|
|
||||||
|
#if LLVM_MAJOR == 17
|
||||||
|
if (!be_quiet)
|
||||||
|
fprintf(stderr,
|
||||||
|
"WARNING: AFL++ splitting integer comparisons is disabled in "
|
||||||
|
"LLVM 17 due bugs, switch to 16 or 18!\n");
|
||||||
|
#else
|
||||||
|
split_comp = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#if LLVM_MAJOR >= 11
|
#if LLVM_MAJOR >= 11
|
||||||
auto PA = PreservedAnalyses::all();
|
auto PA = PreservedAnalyses::all();
|
||||||
#endif
|
#endif
|
||||||
@ -1746,6 +1761,8 @@ bool SplitComparesTransform::runOnModule(Module &M) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (split_comp) {
|
||||||
|
|
||||||
std::vector<CmpInst *> worklist;
|
std::vector<CmpInst *> worklist;
|
||||||
/* iterate over all functions, bbs and instruction search for all integer
|
/* iterate over all functions, bbs and instruction search for all integer
|
||||||
* compare instructions. Save them into the worklist for later. */
|
* compare instructions. Save them into the worklist for later. */
|
||||||
@ -1795,6 +1812,8 @@ bool SplitComparesTransform::runOnModule(Module &M) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
bool brokenDebug = false;
|
bool brokenDebug = false;
|
||||||
if (verifyModule(M, &errs()
|
if (verifyModule(M, &errs()
|
||||||
#if LLVM_VERSION_MAJOR >= 4 || \
|
#if LLVM_VERSION_MAJOR >= 4 || \
|
||||||
|
Reference in New Issue
Block a user