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

Unified Diff: third_party/afl/src/afl-gcc.c

Issue 2662883002: Roll AFL 2.31b:2.38b and switch coverage to use trace-pc-guard. (Closed)
Patch Set: Remove unneeded vuln_samples binaries. Created 3 years, 11 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/afl-fuzz.c ('k') | third_party/afl/src/afl-showmap.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/afl/src/afl-gcc.c
diff --git a/third_party/afl/src/afl-gcc.c b/third_party/afl/src/afl-gcc.c
index 1a588da978e5e5eca9ea801d463c587081c3135b..fa3dec1aaeb0d43ad70793baf2f29249b160ea1c 100644
--- a/third_party/afl/src/afl-gcc.c
+++ b/third_party/afl/src/afl-gcc.c
@@ -229,18 +229,27 @@ static void edit_params(u32 argc, char** argv) {
} else if (getenv("AFL_USE_ASAN")) {
- cc_params[cc_par_cnt++] = "-fsanitize=address";
-
if (getenv("AFL_USE_MSAN"))
FATAL("ASAN and MSAN are mutually exclusive");
- } else if (getenv("AFL_USE_MSAN")) {
+ if (getenv("AFL_HARDEN"))
+ FATAL("ASAN and AFL_HARDEN are mutually exclusive");
- cc_params[cc_par_cnt++] = "-fsanitize=memory";
+ cc_params[cc_par_cnt++] = "-U_FORTIFY_SOURCE";
+ cc_params[cc_par_cnt++] = "-fsanitize=address";
+
+ } else if (getenv("AFL_USE_MSAN")) {
if (getenv("AFL_USE_ASAN"))
FATAL("ASAN and MSAN are mutually exclusive");
+ if (getenv("AFL_HARDEN"))
+ FATAL("MSAN and AFL_HARDEN are mutually exclusive");
+
+ cc_params[cc_par_cnt++] = "-U_FORTIFY_SOURCE";
+ cc_params[cc_par_cnt++] = "-fsanitize=memory";
+
+
}
if (!getenv("AFL_DONT_OPTIMIZE")) {
@@ -314,7 +323,6 @@ int main(int argc, char** argv) {
}
-
find_as(argv[0]);
edit_params(argc, argv);
« no previous file with comments | « third_party/afl/src/afl-fuzz.c ('k') | third_party/afl/src/afl-showmap.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698