Aarch64: Better termination checks for sigcontext reading
authorAlan Hayward <alan.hayward@arm.com>
Fri, 19 Oct 2018 12:51:00 +0000 (13:51 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Fri, 19 Oct 2018 12:51:00 +0000 (13:51 +0100)
commit74b3c713184abb8e07f92c4e069ebafde78c0a0e
tree421499216298a4c72fdf351fc71fb07d1ff4a7a4
parent0667c506823489f2fab1938d3fc8ee27f8a7c651
Aarch64: Better termination checks for sigcontext reading

When reading the reserved section in the sigcontext ensure the
address is updated on an unknown section. Also add additional
checks to prevent reading past the end of the array.

Fixes gdb.base/savedregs.exp

* aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
define.
(aarch64_linux_sigframe_init): Extra boundary checks.
gdb/ChangeLog
gdb/aarch64-linux-tdep.c