diff --git a/ge/common/debug/memory_dumper.cc b/ge/common/debug/memory_dumper.cc index e57c234f..872fe1da 100644 --- a/ge/common/debug/memory_dumper.cc +++ b/ge/common/debug/memory_dumper.cc @@ -154,7 +154,7 @@ int MemoryDumper::OpenFile(const char *filename) { // Using the O_EXCL, if the file already exists,return failed to avoid privilege escalation vulnerability. mmMode_t mode = M_IRUSR | M_IWUSR; - int32_t fd = mmOpen2(real_path.c_str(), M_WRONLY | M_CREAT | O_TRUNC, mode); + int32_t fd = mmOpen2(real_path.c_str(), M_RDWR | M_CREAT | O_TRUNC, mode); if (fd == EN_ERROR || fd == EN_INVALID_PARAM) { GELOGE(kInvalidFd, "open file failed. errno = %d, %s", fd, strerror(errno)); return kInvalidFd; diff --git a/ge/session/session_manager.cc b/ge/session/session_manager.cc index 485b0bd0..69a62923 100755 --- a/ge/session/session_manager.cc +++ b/ge/session/session_manager.cc @@ -173,7 +173,7 @@ Status SessionManager::AddGraph(SessionId session_id, uint32_t graph_id, const G Status SessionManager::AddGraphWithCopy(SessionId session_id, uint32_t graph_id, const Graph &graph, const std::map &options) { if (!init_flag_) { - GELOGE(GE_SESSION_MANAGER_NOT_INIT); + GELOGE(GE_SESSION_MANAGER_NOT_INIT, "Session manager is not initialized."); return GE_SESSION_MANAGER_NOT_INIT; } SessionPtr innerSession = nullptr;