summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-06-22 21:30:18 +0000
committerDave Watson <dade.watson@gmail.com>2021-06-25 09:14:32 -0700
commitffd0c05e8fabef6e2f41569c8d5680eaf5168749 (patch)
tree44a46ef11040830286aea464870cd299a7a7661a
parentec5b64f7a640aae77c4bc53fd690844d077f159d (diff)
downloadlibunwind-ffd0c05e8fabef6e2f41569c8d5680eaf5168749.tar.gz
Add missing case for IA64 in coredump
https://bugs.gentoo.org/586092 this might not be correct, but at least it builds, and doesn't crash.
-rw-r--r--src/coredump/_UCD_access_reg_linux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/coredump/_UCD_access_reg_linux.c b/src/coredump/_UCD_access_reg_linux.c
index 43792f84..65b6b9c1 100644
--- a/src/coredump/_UCD_access_reg_linux.c
+++ b/src/coredump/_UCD_access_reg_linux.c
@@ -57,6 +57,9 @@ _UCD_access_reg (unw_addr_space_t as,
#elif defined(UNW_TARGET_S390X)
if (regnum > UNW_S390X_R15)
goto badreg;
+#elif defined(UNW_TARGET_IA64)
+ if (regnum >= ARRAY_SIZE(ui->prstatus->pr_reg))
+ goto badreg;
#else
#if defined(UNW_TARGET_MIPS)
static const uint8_t remap_regs[] =