yiguolei commented on code in PR #21755: URL: https://github.com/apache/doris/pull/21755#discussion_r1264264791
########## 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 逻辑感觉是错的。 假如我们没有定义这个macro,感觉if else 是错的 ########## 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 逻辑感觉是错的。 假如我们没有定义这个macro,感觉if else 是错的 -- 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