From 2048bcf8ed671b593ac9af2974e10319b9058b20 Mon Sep 17 00:00:00 2001 From: Matthew Bentham Date: Mon, 10 Jan 2022 15:41:26 +0000 Subject: Fix some Thread Sanitizer warnings In ConnectionAcknowledgedCommandHandler use std::atomic to manage access to 'enabled' flag. In StridedSliceAsyncEndToEndTest use separate output buffers for each inference. Neither of these fixes were likely to be causing real bugs in practice but it's helpful for Thread Sanitizer to run cleanly so that they don't hide other real bugs. Signed-off-by: Matthew Bentham Change-Id: I2fcc19bd0afcea3494d9081226754b906bd2bd44 --- src/profiling/ConnectionAcknowledgedCommandHandler.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/profiling') diff --git a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp index 0906f7f9f3..bad61b485f 100644 --- a/src/profiling/ConnectionAcknowledgedCommandHandler.hpp +++ b/src/profiling/ConnectionAcknowledgedCommandHandler.hpp @@ -43,6 +43,7 @@ public: , m_StateMachine(profilingStateMachine) , m_ProfilingServiceStatus(profilingServiceStatus) , m_BackendProfilingContext(backendProfilingContexts) + , m_TimelineEnabled(false) {} void operator()(const arm::pipe::Packet& packet) override; @@ -59,7 +60,7 @@ private: ProfilingStateMachine& m_StateMachine; IProfilingServiceStatus& m_ProfilingServiceStatus; Optional m_BackendProfilingContext; - bool m_TimelineEnabled = false; + std::atomic m_TimelineEnabled; }; } // namespace profiling -- cgit v1.2.1