mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
fix lsan fix
This commit is contained in:
parent
6ed3f4cfac
commit
053334f35d
@ -104,11 +104,19 @@ void set_sanitizer_defaults() {
|
||||
|
||||
u8 buf[2048] = "";
|
||||
if (!have_san_options) { strcpy(buf, default_options); }
|
||||
if (have_asan_options && NULL != strstr(have_asan_options, "detect_leaks=0")) {
|
||||
strcat(buf, "exitcode=" STRINGIFY(LSAN_ERROR) ":fast_unwind_on_malloc=0:print_suppressions=0:detect_leaks=0:malloc_context_size=0:");
|
||||
} else {
|
||||
should_detect_leaks = 1;
|
||||
strcat(buf, "exitcode=" STRINGIFY(LSAN_ERROR) ":fast_unwind_on_malloc=0:print_suppressions=0:detect_leaks=1:malloc_context_size=30:");
|
||||
if (have_asan_options) {
|
||||
|
||||
if (NULL != strstr(have_asan_options, "detect_leaks=0")) {
|
||||
|
||||
strcat(buf, "exitcode=" STRINGIFY(LSAN_ERROR) ":fast_unwind_on_malloc=0:print_suppressions=0:detect_leaks=0:malloc_context_size=0:");
|
||||
|
||||
} else {
|
||||
|
||||
should_detect_leaks = 1;
|
||||
strcat(buf, "exitcode=" STRINGIFY(LSAN_ERROR) ":fast_unwind_on_malloc=0:print_suppressions=0:detect_leaks=1:malloc_context_size=30:");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
setenv("LSAN_OPTIONS", buf, 1);
|
||||
@ -120,9 +128,13 @@ void set_sanitizer_defaults() {
|
||||
if (!have_lsan_options) {
|
||||
|
||||
if (should_detect_leaks) {
|
||||
|
||||
strcat(default_options, "detect_leaks=1:malloc_context_size=30:");
|
||||
|
||||
} else {
|
||||
|
||||
strcat(default_options, "detect_leaks=0:malloc_context_size=0:");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user