1
0
Fork 0
mirror of https://github.com/tobast/libunwind-eh_elf.git synced 2024-11-23 07:57:38 +01:00

(check_callback): If HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS is defined,

check dl_phdr_info.dlpi_subs to see if the cached info may
	be stale.

(Logical change 1.159)
This commit is contained in:
mostang.com!davidm 2004-01-24 06:45:18 +00:00
parent 627437ce2d
commit 9600c00e3e

View file

@ -554,21 +554,21 @@ callback (struct dl_phdr_info *info, size_t size, void *ptr)
static int
check_callback (struct dl_phdr_info *info, size_t size, void *ptr)
{
#ifdef HAVE_DLPI_REMOVALS
#ifdef HAVE_STRUCT_DL_PHDR_INFO_DLPI_SUBS
unw_addr_space_t as = ptr;
if (size < offsetof (struct dl_phdr_info, dlpi_removals)
+ sizeof (info->dlpi_removals))
if (size <
offsetof (struct dl_phdr_info, dlpi_subs) + sizeof (info->dlpi_subs))
/* It would be safer to flush the cache here, but that would
disable caching for older libc's which would be incompatible
with the behavior of older versions of libunwind so we return 1
instead and hope nobody runs into stale cache info... */
return 1;
if (info->dlpi_removals == as->shared_object_removals)
if (info->dlpi_subs == as->shared_object_subs)
return 1;
as->shared_object_removals = info->dlpi_removals;
as->shared_object_subs = info->dlpi_subs;
unw_flush_cache (as, 0, 0);
return -1; /* indicate that there were no new removals */
#else