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/0d4ea776aed1
branches:  trunk
changeset: 1021464:0d4ea776aed1
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 a408a4e692ff -r 0d4ea776aed1 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