fix AFL_REAL_LD for afl-cc

This commit is contained in:
vanhauser-thc
2021-12-08 11:28:33 +01:00
parent 1f6c72ea1b
commit e46adb0be7
2 changed files with 3 additions and 1 deletions

View File

@ -48,6 +48,7 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
- fixed a potential crash in targets for LAF string handling - fixed a potential crash in targets for LAF string handling
- added AFL_USE_TSAN thread sanitizer support - added AFL_USE_TSAN thread sanitizer support
- llvm and LTO mode modified to work with new llvm 14-dev (again) - llvm and LTO mode modified to work with new llvm 14-dev (again)
- fix for AFL_REAL_LD
- added the very good grammar mutator "GramaTron" to the - added the very good grammar mutator "GramaTron" to the
custom_mutators custom_mutators
- added optimin, a faster and better corpus minimizer by - added optimin, a faster and better corpus minimizer by

View File

@ -555,7 +555,8 @@ static void edit_params(u32 argc, char **argv, char **envp) {
if (lto_mode && !have_c) { if (lto_mode && !have_c) {
u8 *ld_path = strdup(AFL_REAL_LD); u8 *ld_path = NULL;
if (getenv("AFL_REAL_LD")) { ld_path = strdup(getenv("AFL_REAL_LD")); }
if (!ld_path || !*ld_path) { ld_path = strdup("ld.lld"); } if (!ld_path || !*ld_path) { ld_path = strdup("ld.lld"); }
if (!ld_path) { PFATAL("Could not allocate mem for ld_path"); } if (!ld_path) { PFATAL("Could not allocate mem for ld_path"); }
#if defined(AFL_CLANG_LDPATH) && LLVM_MAJOR >= 12 #if defined(AFL_CLANG_LDPATH) && LLVM_MAJOR >= 12