mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-11 17:51:32 +00:00
allow symbolize=1 for asan/debug
This commit is contained in:
parent
aa0d378520
commit
2e8ec1e339
@ -247,7 +247,7 @@ ifeq "$(shell command -v svn >/dev/null && svn proplist . 2>/dev/null && echo 1
|
||||
endif
|
||||
|
||||
ifeq "$(shell echo 'int main() { return 0;}' | $(CC) $(CFLAGS) -fsanitize=address -x c - -o .test2 2>/dev/null && echo 1 || echo 0 ; rm -f .test2 )" "1"
|
||||
ASAN_CFLAGS=-fsanitize=address -fstack-protector-all -fno-omit-frame-pointer
|
||||
ASAN_CFLAGS=-fsanitize=address -fstack-protector-all -fno-omit-frame-pointer -DASAN_BUILD
|
||||
ASAN_LDFLAGS=-fsanitize=address -fstack-protector-all -fno-omit-frame-pointer
|
||||
endif
|
||||
|
||||
|
@ -1057,7 +1057,7 @@ void check_crash_handling(void);
|
||||
void check_cpu_governor(afl_state_t *);
|
||||
void get_core_count(afl_state_t *);
|
||||
void fix_up_sync(afl_state_t *);
|
||||
void check_asan_opts(void);
|
||||
void check_asan_opts(afl_state_t *);
|
||||
void check_binary(afl_state_t *, u8 *);
|
||||
void fix_up_banner(afl_state_t *, u8 *);
|
||||
void check_if_tty(afl_state_t *);
|
||||
|
@ -2338,10 +2338,12 @@ static void handle_resize(int sig) {
|
||||
|
||||
/* Check ASAN options. */
|
||||
|
||||
void check_asan_opts(void) {
|
||||
void check_asan_opts(afl_state_t *afl) {
|
||||
|
||||
u8 *x = get_afl_env("ASAN_OPTIONS");
|
||||
|
||||
(void)(afl);
|
||||
|
||||
if (x) {
|
||||
|
||||
if (!strstr(x, "abort_on_error=1")) {
|
||||
@ -2350,11 +2352,13 @@ void check_asan_opts(void) {
|
||||
|
||||
}
|
||||
|
||||
if (!strstr(x, "symbolize=0")) {
|
||||
#ifndef ASAN_BUILD
|
||||
if (!afl->debug && !strstr(x, "symbolize=0")) {
|
||||
|
||||
FATAL("Custom ASAN_OPTIONS set without symbolize=0 - please fix!");
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@ -878,7 +878,7 @@ int main(int argc, char **argv_orig, char **envp) {
|
||||
#endif
|
||||
|
||||
setup_signal_handlers();
|
||||
check_asan_opts();
|
||||
check_asan_opts(afl);
|
||||
|
||||
afl->power_name = power_names[afl->schedule];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user