diff options
author | hexcoder <hexcoder-@users.noreply.github.com> | 2019-10-29 16:44:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-29 16:44:35 +0100 |
commit | cfccadcdc457ab5ad05c8f7c34c737305a28689f (patch) | |
tree | b5c9bc34aa674070f3764033914ecc0a92b3f036 /gcc_plugin/afl-gcc-fast.c | |
parent | 8a10f3f22fa22aef9a167967f7abaaf2a492e4de (diff) | |
parent | 67533cf7c35c8e9e6cb8dfdde9c704187b1970da (diff) | |
download | afl++-cfccadcdc457ab5ad05c8f7c34c737305a28689f.tar.gz |
Merge pull request #95 from devnexen/gcc_plugin_tokencap
copying LLVM mode no builtins.
Diffstat (limited to 'gcc_plugin/afl-gcc-fast.c')
-rw-r--r-- | gcc_plugin/afl-gcc-fast.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/gcc_plugin/afl-gcc-fast.c b/gcc_plugin/afl-gcc-fast.c index 093249a0..057b44cc 100644 --- a/gcc_plugin/afl-gcc-fast.c +++ b/gcc_plugin/afl-gcc-fast.c @@ -108,7 +108,7 @@ static void edit_params(u32 argc, char** argv) { u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1; u8* name; - cc_params = ck_alloc((argc + 64) * sizeof(u8*)); + cc_params = ck_alloc((argc + 128) * sizeof(u8*)); name = strrchr(argv[0], '/'); if (!name) @@ -202,6 +202,19 @@ static void edit_params(u32 argc, char** argv) { } + if (getenv("AFL_NO_BUILTIN")) { + + cc_params[cc_par_cnt++] = "-fno-builtin-strcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strncmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strcasecmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strncasecmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-memcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-bcmp"; + cc_params[cc_par_cnt++] = "-fno-builtin-strstr"; + cc_params[cc_par_cnt++] = "-fno-builtin-strcasestr"; + + } + #ifdef USEMMAP cc_params[cc_par_cnt++] = "-lrt"; #endif |