Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libunwind PR toolchain/55837



details:   https://anonhg.NetBSD.org/src/rev/26aadc818c8b
branches:  trunk
changeset: 983644:26aadc818c8b
user:      rin <rin%NetBSD.org@localhost>
date:      Mon May 31 11:54:01 2021 +0000

description:
PR toolchain/55837

Fix pointer arithmetic when copying s0-s31 registers for arm.

diffstat:

 sys/lib/libunwind/Registers.hpp |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 64b12b8769ad -r 26aadc818c8b sys/lib/libunwind/Registers.hpp
--- a/sys/lib/libunwind/Registers.hpp   Mon May 31 11:50:43 2021 +0000
+++ b/sys/lib/libunwind/Registers.hpp   Mon May 31 11:54:01 2021 +0000
@@ -398,7 +398,7 @@
 #if _BYTE_ORDER == _BIG_ENDIAN
       part = 1 - part;
 #endif
-      memcpy(fpreg + dnum + part * sizeof(fpreg[0]) / 2,
+      memcpy((uint8_t *)(fpreg + dnum) + part * sizeof(fpreg[0]) / 2,
         addr, sizeof(fpreg[0]) / 2);
     }
     if (num <= REGNO_ARM32_D15) {



Home | Main Index | Thread Index | Old Index