Fix frame pointer alignment check.

The frame pointer sanity check in NextStackFrame() was more restrictive than it is necessary. The frame pointer is used to load the saved link-register and the address for the next stack frame. So it only needs to be 8-byte aligned. The aarch64 ABI does not specify an alignment requirement for the frame point.

PiperOrigin-RevId: 463368519
Change-Id: I473e05181603288f14734fe29013900c7505e201
pull/1237/head
Abseil Team 3 years ago committed by Copybara-Service
parent 63c9eeca04
commit b0787ae6bc
  1. 4
      absl/debugging/internal/stacktrace_aarch64-inl.inc

@ -110,8 +110,8 @@ static void **NextStackFrame(void **old_frame_pointer, const void *uc) {
}
#endif
// aarch64 ABI requires stack pointer to be 16-byte-aligned.
if ((reinterpret_cast<uintptr_t>(new_frame_pointer) & 15) != 0)
// The frame pointer should be 8-byte aligned.
if ((reinterpret_cast<uintptr_t>(new_frame_pointer) & 7) != 0)
return nullptr;
// Check frame size. In strict mode, we assume frames to be under

Loading…
Cancel
Save