diff --git a/public/libbacktrace/elf.cpp b/public/libbacktrace/elf.cpp index c0e79a1b..9264853e 100644 --- a/public/libbacktrace/elf.cpp +++ b/public/libbacktrace/elf.cpp @@ -7472,14 +7472,14 @@ phdr_callback_mock (struct dl_phdr_info *info, size_t size ATTRIBUTE_UNUSED, // calculate the end address as well, so we can quickly determine if a PC is within the range of this image // headers aren't guaranteed to be in address order; find the max - ptr->dlpi_end_addr = uintptr_t(info->dlpi_addr); + ptr->dlpi_end_addr = ElfW(Addr)(info->dlpi_addr); for (uint32_t i = 0; i < info->dlpi_phnum; i++) { const auto &phdr = info->dlpi_phdr[i]; if (phdr.p_type != PT_LOAD) continue; - const auto phdr_end = uintptr_t(info->dlpi_addr + phdr.p_vaddr + phdr.p_memsz); + const auto phdr_end = ElfW(Addr)(info->dlpi_addr + phdr.p_vaddr + phdr.p_memsz); ptr->dlpi_end_addr = std::max(phdr_end, ptr->dlpi_end_addr); }