mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-14 02:58:08 +00:00
cleanup
This commit is contained in:
@ -833,14 +833,13 @@ static void set_up_environment(char **argv) {
|
||||
"handle_sigfpe=0:"
|
||||
"handle_sigill=0", 0);
|
||||
|
||||
setenv("LSAN_OPTIONS",
|
||||
setenv("LSAN_OPTIONS",
|
||||
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
|
||||
"fast_unwind_on_malloc=0:"
|
||||
"symbolize=0:"
|
||||
"print_suppressions=0",
|
||||
0);
|
||||
|
||||
|
||||
if (get_afl_env("AFL_PRELOAD")) {
|
||||
|
||||
if (qemu_mode) {
|
||||
|
@ -820,10 +820,11 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
||||
}
|
||||
|
||||
if (getenv("AFL_USE_LSAN")) {
|
||||
|
||||
cc_params[cc_par_cnt++] = "-fsanitize=leak";
|
||||
cc_params[cc_par_cnt++] = "-includesanitizer/lsan_interface.h";
|
||||
cc_params[cc_par_cnt++] =
|
||||
"-D__AFL_LEAK_CHECK()=__lsan_do_leak_check()";
|
||||
cc_params[cc_par_cnt++] = "-D__AFL_LEAK_CHECK()=__lsan_do_leak_check()";
|
||||
|
||||
}
|
||||
|
||||
if (getenv("AFL_USE_CFISAN")) {
|
||||
|
@ -560,7 +560,7 @@ void afl_fsrv_start(afl_forkserver_t *fsrv, char **argv,
|
||||
/* LSAN, too, does not support abort_on_error=1. */
|
||||
|
||||
if (!getenv("LSAN_OPTIONS"))
|
||||
setenv("LSAN_OPTIONS",
|
||||
setenv("LSAN_OPTIONS",
|
||||
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
|
||||
"fast_unwind_on_malloc=0:"
|
||||
"symbolize=0:"
|
||||
@ -1314,8 +1314,9 @@ fsrv_run_result_t afl_fsrv_run_target(afl_forkserver_t *fsrv, u32 timeout,
|
||||
/* A normal crash/abort */
|
||||
(WIFSIGNALED(fsrv->child_status)) ||
|
||||
/* special handling for msan and lsan */
|
||||
(fsrv->uses_asan && (WEXITSTATUS(fsrv->child_status) == MSAN_ERROR ||
|
||||
WEXITSTATUS(fsrv->child_status) == LSAN_ERROR)) ||
|
||||
(fsrv->uses_asan &&
|
||||
(WEXITSTATUS(fsrv->child_status) == MSAN_ERROR ||
|
||||
WEXITSTATUS(fsrv->child_status) == LSAN_ERROR)) ||
|
||||
/* the custom crash_exitcode was returned by the target */
|
||||
(fsrv->uses_crash_exitcode &&
|
||||
WEXITSTATUS(fsrv->child_status) == fsrv->crash_exitcode))) {
|
||||
|
@ -2502,7 +2502,6 @@ void check_asan_opts(afl_state_t *afl) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* Handle stop signal (Ctrl-C, etc). */
|
||||
|
@ -763,7 +763,7 @@ static void set_up_environment(afl_forkserver_t *fsrv, char **argv) {
|
||||
"handle_sigfpe=0:"
|
||||
"handle_sigill=0", 0);
|
||||
|
||||
setenv("LSAN_OPTIONS",
|
||||
setenv("LSAN_OPTIONS",
|
||||
"exitcode=" STRINGIFY(LSAN_ERROR) ":"
|
||||
"fast_unwind_on_malloc=0:"
|
||||
"symbolize=0:"
|
||||
|
Reference in New Issue
Block a user