This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 1ce783fb23 [fix](stacktrace) Temporary fix ARM and MacOS stacktrace 
#23650
1ce783fb23 is described below

commit 1ce783fb230b6fda0afd51d1f08f5c09f421b68b
Author: Xinyi Zou <zouxiny...@gmail.com>
AuthorDate: Wed Aug 30 14:51:20 2023 +0800

    [fix](stacktrace) Temporary fix ARM and MacOS stacktrace #23650
---
 be/src/common/stack_trace.cpp | 2 +-
 be/src/util/stack_util.cpp    | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/be/src/common/stack_trace.cpp b/be/src/common/stack_trace.cpp
index f5fb2a1901..703dfe49b6 100644
--- a/be/src/common/stack_trace.cpp
+++ b/be/src/common/stack_trace.cpp
@@ -299,7 +299,7 @@ StackTrace::StackTrace(const ucontext_t& signal_context) {
 void StackTrace::tryCapture() {
     // When unw_backtrace is not available, fall back on the standard
     // `backtrace` function from execinfo.h.
-#if USE_UNWIND
+#if USE_UNWIND && defined(__x86_64__) // TODO
     size = unw_backtrace(frame_pointers.data(), capacity);
 #else
     size = backtrace(frame_pointers.data(), capacity);
diff --git a/be/src/util/stack_util.cpp b/be/src/util/stack_util.cpp
index 01ced12708..ca32808935 100644
--- a/be/src/util/stack_util.cpp
+++ b/be/src/util/stack_util.cpp
@@ -45,6 +45,9 @@ std::string get_stack_trace() {
     } else if (tool == "glibc") {
         return get_stack_trace_by_glibc();
     } else if (tool == "libunwind") {
+#if defined(__APPLE__) // TODO
+        return get_stack_trace_by_glog();
+#endif
         return get_stack_trace_by_libunwind();
     } else {
         return "no stack";


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to