diff options
author | Abseil Team <absl-team@google.com> | 2022-07-26 10:15:43 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-07-26 10:16:30 -0700 |
commit | b0787ae6bcd7fc9bc7dc572dcc6d8ee83cd9b0d9 (patch) | |
tree | c49a2347e631f3da94cdb34ab231523ae4fbf1ca /absl/debugging | |
parent | 63c9eeca0464c08ccb861b21e33e10faead414c9 (diff) |
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
Diffstat (limited to 'absl/debugging')
-rw-r--r-- | absl/debugging/internal/stacktrace_aarch64-inl.inc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/absl/debugging/internal/stacktrace_aarch64-inl.inc b/absl/debugging/internal/stacktrace_aarch64-inl.inc index 4f9db9d6..891942c0 100644 --- a/absl/debugging/internal/stacktrace_aarch64-inl.inc +++ b/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 |