Run C++ control flow validation on FunctionDefs before running.
authorSkye Wanderman-Milne <skyewm@google.com>
Wed, 3 Jan 2018 23:40:03 +0000 (15:40 -0800)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 3 Jan 2018 23:43:22 +0000 (15:43 -0800)
commit41ceb56c7f8e54dc6a11c0349c112404bdb3db54
tree7020324ced33d35786107a79f3660dea75c0243c
parent7753ab0b4aa3ff989b61725cbf42c4c57e176999
Run C++ control flow validation on FunctionDefs before running.

Clients should ideally prevent such functions from being created in
the first place, but we still want the runtime to be robust to
malformed functions. Trying to run functions with invalid control flow
constructs can result in crashes or hangs, so we want to catch it
before running.

PiperOrigin-RevId: 180727589
tensorflow/core/common_runtime/function.cc
tensorflow/core/common_runtime/function_test.cc
tensorflow/core/framework/function_testlib.cc
tensorflow/core/framework/function_testlib.h
tensorflow/core/graph/control_flow.h