xinyiZzz commented on code in PR #21755:
URL: https://github.com/apache/doris/pull/21755#discussion_r1264308355


##########
be/src/util/stack_util.cpp:
##########
@@ -25,15 +35,54 @@ void DumpStackTraceToString(std::string* stacktrace);
 
 namespace doris {
 
-// `boost::stacktrace::stacktrace()` has memory leak, so use the glog internal 
func to print stacktrace.
-// The reason for the boost::stacktrace memory leak is that a state is saved 
in the thread local of each
-// thread but is not actively released. Refer to:
-// https://github.com/boostorg/stacktrace/issues/118
-// https://github.com/boostorg/stacktrace/issues/111
 std::string get_stack_trace() {
+#ifdef ENABLE_STACKTRACE

Review Comment:
   没问题,没有定义的 macro 默认就是false,直接 `return "no enable stack"`,
   代码里有个 `USE_MUSL` 也没定义,默认就是false,为了避免以后用到的时候忘了就留着了



##########
be/src/util/stack_util.cpp:
##########
@@ -25,15 +35,54 @@ void DumpStackTraceToString(std::string* stacktrace);
 
 namespace doris {
 
-// `boost::stacktrace::stacktrace()` has memory leak, so use the glog internal 
func to print stacktrace.
-// The reason for the boost::stacktrace memory leak is that a state is saved 
in the thread local of each
-// thread but is not actively released. Refer to:
-// https://github.com/boostorg/stacktrace/issues/118
-// https://github.com/boostorg/stacktrace/issues/111
 std::string get_stack_trace() {
+#ifdef ENABLE_STACKTRACE

Review Comment:
   没问题,没有定义的 macro 默认就是false,直接 `return "no enable stack"`,
   代码里有个 `USE_MUSL` 也没定义,默认就是false,为了避免以后用到的时候忘了就留着了



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to