aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Qianli Scott Zhu <scottzhu@google.com>2018-07-03 10:27:48 -0700
committerGravatar GitHub <noreply@github.com>2018-07-03 10:27:48 -0700
commit376dd18b8a42a04990b08c1e6ec0b61e35d32d97 (patch)
tree945f966f5d009bba1d291d3aeb0aa5dd7e5b499e
parent519487fb313a31701fd31e67c0ceb6eae8ea9225 (diff)
parent95e0e8c335c9c788d10f27962768e6e85920a853 (diff)
Merge pull request #20095 from xxxx001/official
Verification invalid eager env_ or env_->rendezvous_mgr.
-rw-r--r--tensorflow/core/distributed_runtime/eager/eager_service_impl.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc b/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
index 5a26d5bf48..7e47d859b9 100644
--- a/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
+++ b/tensorflow/core/distributed_runtime/eager/eager_service_impl.cc
@@ -81,6 +81,10 @@ Status GetNumRetvals(tensorflow::EagerContext* context, const string& op_name,
Status EagerServiceImpl::CreateContext(const CreateContextRequest* request,
CreateContextResponse* response) {
+ //make sure env_ , env_->rendezvous_mgr available
+ if (env_ == nullptr || env_->rendezvous_mgr == nullptr) {
+ return tensorflow::errors::Internal("invalid eager env_ or env_->rendezvous_mgr.");
+ }
std::vector<tensorflow::Device*> devices;
TF_RETURN_IF_ERROR(tensorflow::DeviceFactory::AddDevices(