mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-21 05:42:12 +00:00
fix split pass loading
This commit is contained in:
@ -24,6 +24,8 @@ sending a mail to <afl-users+subscribe@googlegroups.com>.
|
|||||||
possible in the target (for afl-gcc-fast/afl-clang-fast/
|
possible in the target (for afl-gcc-fast/afl-clang-fast/
|
||||||
afl-clang-lto)
|
afl-clang-lto)
|
||||||
- afl-cc:
|
- afl-cc:
|
||||||
|
! llvm15-dev with LTO and extra features (LAF/CMPLOG etc.) might have
|
||||||
|
issues at the moment
|
||||||
- converted all passed to use the new llvm pass manager for llvm 11+
|
- converted all passed to use the new llvm pass manager for llvm 11+
|
||||||
- frida_mode:
|
- frida_mode:
|
||||||
- update to new frida release, handles now c++ throw/catch
|
- update to new frida release, handles now c++ throw/catch
|
||||||
|
19
src/afl-cc.c
19
src/afl-cc.c
@ -526,11 +526,17 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
||||||
|
cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
|
||||||
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("-fpass-plugin=%s/split-compares-pass.so", obj_path);
|
||||||
|
#else
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
cc_params[cc_par_cnt++] = "-load";
|
cc_params[cc_par_cnt++] = "-load";
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
alloc_printf("%s/split-compares-pass.so", obj_path);
|
alloc_printf("%s/split-compares-pass.so", obj_path);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -553,6 +559,16 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
cc_params[cc_par_cnt++] = "-fno-inline";
|
||||||
|
|
||||||
|
#if LLVM_MAJOR >= 11 /* use new pass manager */
|
||||||
|
cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
|
||||||
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("-fpass-plugin=%s/cmplog-switches-pass.so", obj_path);
|
||||||
|
cc_params[cc_par_cnt++] = "-fexperimental-new-pass-manager";
|
||||||
|
cc_params[cc_par_cnt++] =
|
||||||
|
alloc_printf("-fpass-plugin=%s/split-switches-pass.so", obj_path);
|
||||||
|
#else
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
cc_params[cc_par_cnt++] = "-load";
|
cc_params[cc_par_cnt++] = "-load";
|
||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
@ -565,11 +581,10 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
cc_params[cc_par_cnt++] = "-Xclang";
|
cc_params[cc_par_cnt++] = "-Xclang";
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
alloc_printf("%s/split-switches-pass.so", obj_path);
|
alloc_printf("%s/split-switches-pass.so", obj_path);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_params[cc_par_cnt++] = "-fno-inline";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//#if LLVM_MAJOR >= 13
|
//#if LLVM_MAJOR >= 13
|
||||||
|
Reference in New Issue
Block a user