diff options
author | Roman Gershman <romange@gmail.com> | 2020-11-05 21:14:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-05 14:14:20 -0500 |
commit | 731852f10b737c5a5c3be93777a2c17b24b4c5a6 (patch) | |
tree | b78c007a53103b279e0ade0d058e94b081ce201e /absl/debugging/internal/stacktrace_aarch64-inl.inc | |
parent | 2e5f2bcfd9adef0a40cbfdc7d92e24e97dad8776 (diff) |
Fix stacktrace on aarch64 architecture. Fixes #805 (#827)
* Fix stacktrace on aarch64 architecture
* Tweak formatting to fit in 80 cols
Diffstat (limited to 'absl/debugging/internal/stacktrace_aarch64-inl.inc')
-rw-r--r-- | absl/debugging/internal/stacktrace_aarch64-inl.inc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/absl/debugging/internal/stacktrace_aarch64-inl.inc b/absl/debugging/internal/stacktrace_aarch64-inl.inc index 14a76f1e..f4859d7c 100644 --- a/absl/debugging/internal/stacktrace_aarch64-inl.inc +++ b/absl/debugging/internal/stacktrace_aarch64-inl.inc @@ -37,8 +37,11 @@ static const unsigned char* GetKernelRtSigreturnAddress() { absl::debugging_internal::VDSOSupport vdso; if (vdso.IsPresent()) { absl::debugging_internal::VDSOSupport::SymbolInfo symbol_info; - if (!vdso.LookupSymbol("__kernel_rt_sigreturn", "LINUX_2.6.39", STT_FUNC, - &symbol_info) || + auto lookup = [&](int type) { + return vdso.LookupSymbol("__kernel_rt_sigreturn", "LINUX_2.6.39", type, + &symbol_info); + }; + if ((!lookup(STT_FUNC) && !lookup(STT_NOTYPE)) || symbol_info.address == nullptr) { // Unexpected: VDSO is present, yet the expected symbol is missing // or null. |