Destructor of unwind related code called mmap_cache_delete function.
However, now, other parts than unwind.c can use mmap cache.
So mmap_cache_delete, the cache destructor should be called separately
from unwind related code.

* strace.c (droptcb): Call mmap_cache_delete.
* unwind.c (unwind_tcb_fin): Don't call mmap_cache_delete.

Signed-off-by: Masatake YAMATO <yam...@redhat.com>
---
 strace.c | 2 ++
 unwind.c | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/strace.c b/strace.c
index 10579f66..794e9a0d 100644
--- a/strace.c
+++ b/strace.c
@@ -803,6 +803,8 @@ droptcb(struct tcb *tcp)
        }
 #endif
 
+       mmap_cache_delete(tcp, __func__);
+
        nprocs--;
        debug_msg("dropped tcb for pid %d, %d remain", tcp->pid, nprocs);
 
diff --git a/unwind.c b/unwind.c
index ef98fc99..3457ec84 100644
--- a/unwind.c
+++ b/unwind.c
@@ -98,8 +98,6 @@ unwind_tcb_fin(struct tcb *tcp)
        free(tcp->queue);
        tcp->queue = NULL;
 
-       mmap_cache_delete(tcp, __func__);
-
        _UPT_destroy(tcp->libunwind_ui);
        tcp->libunwind_ui = NULL;
 }
-- 
2.14.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Strace-devel mailing list
Strace-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/strace-devel

Reply via email to