Skip to content

Commit 5e03a33

Browse files
committed
Fix the build because I am clever
1 parent 865181e commit 5e03a33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libunwind/src/Registers.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,6 +1944,7 @@ inline Registers_arm64::Registers_arm64(const void *registers) {
19441944
memcpy(_vectorHalfRegisters,
19451945
static_cast<const uint8_t *>(registers) + sizeof(GPRs),
19461946
sizeof(_vectorHalfRegisters));
1947+
_misc_registers.__vg = 0;
19471948

19481949
#if defined(_LIBUNWIND_TARGET_AARCH64_AUTHENTICATED_UNWINDING)
19491950
// We have to do some pointer authentication fixups after this copy,
@@ -1963,16 +1964,15 @@ inline Registers_arm64::Registers_arm64(const Registers_arm64 &other) {
19631964

19641965
inline Registers_arm64 &
19651966
Registers_arm64::operator=(const Registers_arm64 &other) {
1966-
memmove(this, &other, sizeof(Registers_arm64));
1967+
memmove(static_cast<void *>(this), &other, sizeof(*this));
19671968
// We perform this step to ensure that we correctly authenticate and re-sign
19681969
// the pc after the bitwise copy.
19691970
setIP(other.getIP());
19701971
return *this;
19711972
}
19721973

19731974
inline Registers_arm64::Registers_arm64() {
1974-
memset(&_registers, 0, sizeof(_registers));
1975-
memset(&_vectorHalfRegisters, 0, sizeof(_vectorHalfRegisters));
1975+
memset(static_cast<void *>(this), 0, sizeof(*this));
19761976
}
19771977

19781978
inline bool Registers_arm64::validRegister(int regNum) const {

0 commit comments

Comments
 (0)