Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: third_party/afl/src/llvm_mode/afl-clang-fast.c

Issue 2238013002: Roll src/third_party/afl/src/ 2.14b..2.30b (16 versions). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Note in "Local Modifications" that we have removed dictionaries/. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/afl/src/llvm_mode/README.llvm ('k') | third_party/afl/src/llvm_mode/afl-llvm-rt.o.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/afl/src/llvm_mode/afl-clang-fast.c
diff --git a/third_party/afl/src/llvm_mode/afl-clang-fast.c b/third_party/afl/src/llvm_mode/afl-clang-fast.c
index b9cedea954ad3d26d259f2b7b054d7f7d793ea07..725a16fa5149400306893514471724b3ba0326c4 100644
--- a/third_party/afl/src/llvm_mode/afl-clang-fast.c
+++ b/third_party/afl/src/llvm_mode/afl-clang-fast.c
@@ -99,7 +99,7 @@ static void edit_params(u32 argc, char** argv) {
u8 fortify_set = 0, asan_set = 0, x_set = 0, maybe_linking = 1, bit_mode = 0;
u8 *name;
- cc_params = ck_alloc((argc + 64) * sizeof(u8*));
+ cc_params = ck_alloc((argc + 128) * sizeof(u8*));
name = strrchr(argv[0], '/');
if (!name) name = argv[0]; else name++;
@@ -130,6 +130,10 @@ static void edit_params(u32 argc, char** argv) {
cc_params[cc_par_cnt++] = "-Qunused-arguments";
+ /* Detect stray -v calls from ./configure scripts. */
+
+ if (argc == 1 && !strcmp(argv[1], "-v")) maybe_linking = 0;
+
while (--argc) {
u8* cur = *(++argv);
@@ -138,8 +142,8 @@ static void edit_params(u32 argc, char** argv) {
if (!strcmp(cur, "-x")) x_set = 1;
- if (!strcmp(cur, "-c") || !strcmp(cur, "-S") || !strcmp(cur, "-E") ||
- !strcmp(cur, "-v")) maybe_linking = 0;
+ if (!strcmp(cur, "-c") || !strcmp(cur, "-S") || !strcmp(cur, "-E"))
+ maybe_linking = 0;
if (!strcmp(cur, "-fsanitize=address") ||
!strcmp(cur, "-fsanitize=memory")) asan_set = 1;
@@ -196,6 +200,16 @@ 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++] = "-D__AFL_HAVE_MANUAL_CONTROL=1";
cc_params[cc_par_cnt++] = "-D__AFL_COMPILER=1";
cc_params[cc_par_cnt++] = "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION=1";
« no previous file with comments | « third_party/afl/src/llvm_mode/README.llvm ('k') | third_party/afl/src/llvm_mode/afl-llvm-rt.o.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698