afl-clang-lto incomptable with -flto=thin

This commit is contained in:
vanhauser-thc
2023-05-12 08:39:11 +02:00
parent a752b15921
commit 93c821aaa3
2 changed files with 10 additions and 0 deletions

View File

@ -13,6 +13,7 @@
- afl-cc: - afl-cc:
- new env `AFL_LLVM_LTO_SKIPINIT` to support the AFL++ based WASM - new env `AFL_LLVM_LTO_SKIPINIT` to support the AFL++ based WASM
(https://github.com/fgsect/WAFL) project (https://github.com/fgsect/WAFL) project
- error and print help if afl-clan-lto is used with lto=thin
- afl-showmap: - afl-showmap:
- added custom mutator post_process and send support - added custom mutator post_process and send support
- add `-I filelist` option, an alternative to `-i in_dir` - add `-I filelist` option, an alternative to `-i in_dir`

View File

@ -853,6 +853,15 @@ static void edit_params(u32 argc, char **argv, char **envp) {
if (cur[0] != '-') { non_dash = 1; } if (cur[0] != '-') { non_dash = 1; }
if (!strncmp(cur, "--afl", 5)) continue; if (!strncmp(cur, "--afl", 5)) continue;
if (lto_mode && !strncmp(cur, "-flto=thin", 10)) {
FATAL(
"afl-clang-lto cannot work with -flto=thin. Switch to -flto=full or "
"use afl-clang-fast!");
}
if (lto_mode && !strncmp(cur, "-fuse-ld=", 9)) continue; if (lto_mode && !strncmp(cur, "-fuse-ld=", 9)) continue;
if (lto_mode && !strncmp(cur, "--ld-path=", 10)) continue; if (lto_mode && !strncmp(cur, "--ld-path=", 10)) continue;
if (!strncmp(cur, "-fno-unroll", 11)) continue; if (!strncmp(cur, "-fno-unroll", 11)) continue;