You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2023/04/23 16:20:37 UTC

[doris] 04/08: [bugfix](asan) fix possible asan check bug in exception to string (#18936)

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

morningman pushed a commit to branch branch-2.0-alpha
in repository https://gitbox.apache.org/repos/asf/doris.git

commit 7fb86133e13aab7f3c795f900921c6f71002c894
Author: yiguolei <67...@qq.com>
AuthorDate: Sun Apr 23 12:26:36 2023 +0800

    [bugfix](asan) fix possible asan check bug in exception to string (#18936)
    
    Co-authored-by: yiguolei <yi...@gmail.com>
---
 be/src/common/exception.h | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/be/src/common/exception.h b/be/src/common/exception.h
index 3723db0891..29437cfead 100644
--- a/be/src/common/exception.h
+++ b/be/src/common/exception.h
@@ -45,10 +45,7 @@ public:
     Exception(int code, const std::string_view fmt, Args&&... args)
             : Exception(code, fmt::format(fmt, std::forward<Args>(args)...)) {}
 
-    std::string code_as_string() const {
-        return (int)_code >= 0 ? doris::to_string(static_cast<TStatusCode::type>(_code))
-                               : fmt::format("E{}", (int16_t)_code);
-    }
+    std::string code_as_string() const { return fmt::format("E{}", _code); }
 
     int code() const { return _code; }
 


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