diff --git a/cmake/options.cmake b/cmake/options.cmake index 7971d9e3425b568a1553068aac2f35f644c4e82a..a9ccc80feb5aedcce30a853e7092e04c4d1cdbd2 100644 --- a/cmake/options.cmake +++ b/cmake/options.cmake @@ -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() diff --git a/mindspore/ccsrc/minddata/dataset/util/status.cc b/mindspore/ccsrc/minddata/dataset/util/status.cc index 438686fa3fa39289ce9d0dba1af8975b16217f51..0ad45f71244934e95f510268d7bcf428100fa570 100644 --- a/mindspore/ccsrc/minddata/dataset/util/status.cc +++ b/mindspore/ccsrc/minddata/dataset/util/status.cc @@ -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_("") {}