diff options
| author | vanhauser-thc <vh@thc.org> | 2022-08-06 09:07:49 +0200 |
|---|---|---|
| committer | vanhauser-thc <vh@thc.org> | 2022-08-06 09:07:49 +0200 |
| commit | 7b6ee28291c13e293c59489d4f2e37c78bad96fb (patch) | |
| tree | a2af51193282a240600031b05f1924d84f0a33fd /frida_mode/src/asan | |
| parent | 94fe62ad8db938757a3052f2041aef390e19c9a1 (diff) | |
| download | afl++-7b6ee28291c13e293c59489d4f2e37c78bad96fb.tar.gz | |
code format
Diffstat (limited to 'frida_mode/src/asan')
| -rw-r--r-- | frida_mode/src/asan/asan.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/frida_mode/src/asan/asan.c b/frida_mode/src/asan/asan.c index bd4062be..ad171337 100644 --- a/frida_mode/src/asan/asan.c +++ b/frida_mode/src/asan/asan.c @@ -8,17 +8,23 @@ static gboolean asan_enabled = FALSE; gboolean asan_initialized = FALSE; void asan_config(void) { + if (getenv("AFL_USE_FASAN") != NULL) { asan_enabled = TRUE; } + } void asan_init(void) { + FOKF(cBLU "Instrumentation" cRST " - " cGRN "asan:" cYEL " [%c]", asan_enabled ? 'X' : ' '); if (asan_enabled) { + asan_arch_init(); asan_initialized = TRUE; + } + } static gboolean asan_exclude_module(const GumModuleDetails *details, @@ -34,13 +40,19 @@ static gboolean asan_exclude_module(const GumModuleDetails *details, * then ignore it */ if (address < details->range->base_address) { return TRUE; } if (address > (details->range->base_address + details->range->size)) { + return TRUE; + } ranges_add_exclude((GumMemoryRange *)details->range); return FALSE; + } void asan_exclude_module_by_symbol(gchar *symbol_name) { + gum_process_enumerate_modules(asan_exclude_module, symbol_name); + } + |
