diff options
author | van Hauser <vh@thc.org> | 2024-03-06 17:56:24 +0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 17:56:24 +0700 |
commit | 092260e9f9775ace39447f855fb9a93f94a12de1 (patch) | |
tree | 53efc4eb246c494034130bee25f276939ae146bf | |
parent | 6062668679300af97248a59775cde45537601480 (diff) | |
parent | bf179533531a1c557e33fc38dd170c43abfbc45a (diff) | |
download | afl++-092260e9f9775ace39447f855fb9a93f94a12de1.tar.gz |
Merge pull request #2026 from choller/pcmap_fix2
Fix delayed pcmap writing for code coverage with pc-table
-rw-r--r-- | instrumentation/afl-compiler-rt.o.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/instrumentation/afl-compiler-rt.o.c b/instrumentation/afl-compiler-rt.o.c index aa58e8de..e450dc45 100644 --- a/instrumentation/afl-compiler-rt.o.c +++ b/instrumentation/afl-compiler-rt.o.c @@ -1617,7 +1617,7 @@ void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg, } - if (pc_filter) { + if (pc_filter && !mod_info->next) { char PcDescr[1024]; // This function is a part of the sanitizer run-time. @@ -1644,7 +1644,8 @@ void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg, } - if (__afl_filter_pcs && strstr(mod_info->name, __afl_filter_pcs_module)) { + if (__afl_filter_pcs && !mod_info->next && + strstr(mod_info->name, __afl_filter_pcs_module)) { u32 result_index; if (locate_in_pcs(PC, &result_index)) { @@ -1669,7 +1670,7 @@ void __sanitizer_cov_pcs_init(const uintptr_t *pcs_beg, } - mod_info->mapped = 1; + if (__afl_pcmap_ptr) { mod_info->mapped = 1; } if (__afl_debug) { |