From 08d01376de5abf2e93c562ee5e24cf62ce1be3ff Mon Sep 17 00:00:00 2001 From: Benoît Ganne Date: Wed, 22 Apr 2020 09:02:48 +0200 Subject: misc: asan: do not poison memory after munmap() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is a bad idea to poison memory after munmap because the address space can be reused (eg. for global data of dlopen()ed object) and ASan model allows access by default. Moreover, access to a stale address space will fault. Type: fix Change-Id: I356de422f255447d9d50a3a71fb0c2eaa790d731 Signed-off-by: Benoît Ganne --- src/plugins/perfmon/perfmon_periodic.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/plugins/perfmon') diff --git a/src/plugins/perfmon/perfmon_periodic.c b/src/plugins/perfmon/perfmon_periodic.c index 8498419f36f..37d669b8d13 100644 --- a/src/plugins/perfmon/perfmon_periodic.c +++ b/src/plugins/perfmon/perfmon_periodic.c @@ -248,8 +248,6 @@ disable_events (perfmon_main_t * pm) if (munmap (pm->perf_event_pages[i][my_thread_index], pm->page_size) < 0) clib_unix_warning ("munmap"); - CLIB_MEM_POISON (pm->perf_event_pages[i][my_thread_index], - pm->page_size); pm->perf_event_pages[i][my_thread_index] = 0; } -- cgit 1.2.3-korg