unwind: delete mmap cache in free_libunwind_ui
authorMasatake YAMATO <yamato@redhat.com>
Wed, 16 Apr 2014 06:33:01 +0000 (15:33 +0900)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 30 May 2014 22:30:07 +0000 (22:30 +0000)
free_libunwind_ui is expected to release all unwind related resources
attached to tcp.

* strace.c (droptcb): Move delete_mmap_cache call ...
* unwind.c (free_libunwind_ui): ... to here.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
strace.c
unwind.c

index a8b04b076ad3737490cc0382e20f978295be125f..0f7f16c833187c0ad635d66e0e4879586620f2c1 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -747,7 +747,6 @@ droptcb(struct tcb *tcp)
 
 #ifdef USE_LIBUNWIND
        if (stack_trace_enabled) {
-               delete_mmap_cache(tcp);
                free_libunwind_ui(tcp);
        }
 #endif
index 7c179bf2f35dc049d744c5d88c46a82b4f4f9845..fc97ea2d060126161933e1b92183778c80596c0a 100644 (file)
--- a/unwind.c
+++ b/unwind.c
@@ -69,6 +69,7 @@ init_libunwind_ui(struct tcb *tcp)
 void
 free_libunwind_ui(struct tcb *tcp)
 {
+       delete_mmap_cache(tcp);
        _UPT_destroy(tcp->libunwind_ui);
        tcp->libunwind_ui = NULL;
 }