提交 5c0b0c49 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!5358 Fix utest asan

Merge pull request !5358 from zhoufeng/ut-asan
......@@ -40,7 +40,7 @@ endif()
if (ENABLE_ASAN)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libasan -fsanitize=undefined")
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fsanitize-recover=address -fno-omit-frame-pointer -fsanitize=undefined")
else()
set(OPTION_CXX_FLAGS "${OPTION_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -static-libsan -fsanitize=undefined")
endif()
......
......@@ -60,7 +60,7 @@ std::string CodeAsString(const StatusCode c) {
return std::string(s);
}
Status::Status(StatusCode c) noexcept : code_(c), err_msg_(std::move(CodeAsString(c))) {}
Status::Status(StatusCode c) noexcept : code_(c), err_msg_(CodeAsString(c)) {}
Status::Status() noexcept : code_(StatusCode::kOK), err_msg_("") {}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册