From 24dcc5eb37dcb3c657ceef5fa33b48b1237342f5 Mon Sep 17 00:00:00 2001 From: hexcoder- Date: Thu, 13 Feb 2020 21:06:09 +0100 Subject: fix issue #194 more seriously --- gcc_plugin/afl-gcc-fast.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc_plugin/afl-gcc-fast.c') diff --git a/gcc_plugin/afl-gcc-fast.c b/gcc_plugin/afl-gcc-fast.c index 3117ccf0..2eef8798 100644 --- a/gcc_plugin/afl-gcc-fast.c +++ b/gcc_plugin/afl-gcc-fast.c @@ -192,6 +192,14 @@ static void edit_params(u32 argc, char** argv) { } + if (getenv("AFL_USE_UBSAN")) { + + cc_params[cc_par_cnt++] = "-fsanitize=undefined"; + cc_params[cc_par_cnt++] = "-fsanitize-undefined-trap-on-error"; + cc_params[cc_par_cnt++] = "-fno-sanitize-recover=all"; + + } + } if (!getenv("AFL_DONT_OPTIMIZE")) { -- cgit 1.4.1