enable libunwind caching to avoid potential memory leak

svn: r17494
This commit is contained in:
Matthew Flatt 2010-01-06 16:28:22 +00:00
parent b54876e91c
commit 3006abec4b

View File

@ -2428,6 +2428,7 @@ int unw_init_local (unw_cursor_t *cursor, ucontext_t *uc)
if (!unw_local_addr_space) {
unw_local_addr_space = (unw_addr_space_t)malloc(sizeof(struct unw_addr_space));
memset(unw_local_addr_space, 0, sizeof(unw_local_addr_space));
unw_local_addr_space->caching_policy = UNW_CACHE_GLOBAL;
}
c->dwarf.as = unw_local_addr_space;