Fix use-of-uninitialized memory in EagerExecutor::Run().
PiperOrigin-RevId: 266167044
This commit is contained in:
parent
a4fe7d8b69
commit
4aa7af5ed4
@ -269,7 +269,8 @@ void EagerExecutor::Run() {
|
||||
{
|
||||
tensorflow::mutex_lock l(node_queue_mutex_);
|
||||
// If false, NodeDone has been called.
|
||||
if (curr_node_raw == node_queue_.front().get()) {
|
||||
if (!node_queue_.empty() &&
|
||||
curr_node_raw == node_queue_.front().get()) {
|
||||
node_queue_.front().release();
|
||||
node_queue_.pop();
|
||||
unfinished_nodes_.emplace(curr_node_raw);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user