I agree that checking the size passed to backtrace_get_view seems like the most reliable approach to avoid problems with large files on 32-bit systems. How does this patch look? Ian 2019-01-18 Ian Lance Taylor PR libbacktrace/88890 * mmapio.c (backtrace_get_view): Change size parameter to uint64_t. Check that value fits in size_t. * read.c (backtrace_get_view): Likewise. * internal.h (backtrace_get_view): Update declaration. * elf.c (elf_add): Pass shstrhdr->sh_size to backtrace_get_view.