aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-04-30 11:59:42 +0200
committervanhauser-thc <vh@thc.org>2024-04-30 11:59:49 +0200
commit5d623a27edcd4e6608178f80c7e29ede73138db6 (patch)
treed99dfa9b5c5f2cf1e44ccfda26b06eeaac1c8db3
parent69e554b9413b526b4e801080df57377cd260827a (diff)
downloadafl++-5d623a27edcd4e6608178f80c7e29ede73138db6.tar.gz
try enhanced asan support
-rw-r--r--src/afl-cc.c8
-rw-r--r--src/afl-common.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 15a5bd8e..fa3318de 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1911,7 +1911,13 @@ void add_sanitizers(aflcc_state_t *aflcc, char **envp) {
}
add_defs_fortify(aflcc, 0);
- if (!aflcc->have_asan) { insert_param(aflcc, "-fsanitize=address"); }
+ if (!aflcc->have_asan) {
+
+ insert_param(aflcc, "-fsanitize=address");
+ insert_param(aflcc, "-fno-common");
+
+ }
+
aflcc->have_asan = 1;
} else if (getenv("AFL_USE_MSAN") || aflcc->have_msan) {
diff --git a/src/afl-common.c b/src/afl-common.c
index d86b431b..9a27824d 100644
--- a/src/afl-common.c
+++ b/src/afl-common.c
@@ -108,9 +108,10 @@ void set_sanitizer_defaults() {
u8 *have_lsan_options = getenv("LSAN_OPTIONS");
u8 have_san_options = 0;
u8 default_options[1024] =
- "detect_odr_violation=0:abort_on_error=1:symbolize=0:allocator_may_"
- "return_null=1:handle_segv=0:handle_sigbus=0:handle_abort=0:handle_"
- "sigfpe=0:handle_sigill=0:";
+ "detect_odr_violation=0:abort_on_error=1:symbolize=0:"
+ "allocator_may_return_null=1:handle_segv=0:handle_sigbus=0:"
+ "handle_abort=0:handle_sigfpe=0:handle_sigill=0:"
+ "detect_stack_use_after_return=0:check_initialization_order=0:";
if (have_asan_options || have_ubsan_options || have_msan_options ||
have_lsan_options) {