From 7cdd88eb941503af0aec0924df41f0adc69a3854 Mon Sep 17 00:00:00 2001 From: Li Lao Date: Wed, 12 Feb 2020 21:55:33 -0800 Subject: [PATCH] Initialize the inter and intra-op thread pool pointers in ThreadPoolOptions to nullptr. Otherwise, they may have arbitrary values. PiperOrigin-RevId: 294833933 Change-Id: I95ff98f6a7fe308c59f1c8bf7e1b25f4c68223dc --- tensorflow/core/platform/threadpool_options.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/core/platform/threadpool_options.h b/tensorflow/core/platform/threadpool_options.h index f7ae4640ad7..a5b7ba2d156 100644 --- a/tensorflow/core/platform/threadpool_options.h +++ b/tensorflow/core/platform/threadpool_options.h @@ -23,10 +23,10 @@ namespace thread { struct ThreadPoolOptions { // If not null, use this threadpool to schedule inter-op operation - thread::ThreadPoolInterface* inter_op_threadpool; + thread::ThreadPoolInterface* inter_op_threadpool = nullptr; // If not null, use this threadpool to schedule intra-op operation - thread::ThreadPoolInterface* intra_op_threadpool; + thread::ThreadPoolInterface* intra_op_threadpool = nullptr; }; } // namespace thread