aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFinn Williams <Finn.Williams@arm.com>2020-03-18 12:51:43 +0000
committerfinn.williams <finn.williams@arm.com>2020-03-19 10:18:00 +0000
commitd15ee15ebe7b3a338385b2c948f092fe806f5d38 (patch)
treed45b9924e97e10f199e65fdc4b83611fbc67a69c
parenta83af7b388a1ac721c6a85b0e80ac2950687dfad (diff)
downloadarmnn-d15ee15ebe7b3a338385b2c948f092fe806f5d38.tar.gz
IVGCVSW-4552 Fix Wrapper Object Use after free in ProfilerTests
Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I84ab68c048675a39a67045430b2dde571b45e479
-rw-r--r--src/armnn/test/ProfilerTests.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/armnn/test/ProfilerTests.cpp b/src/armnn/test/ProfilerTests.cpp
index 9376fa4cea..40e9f470ad 100644
--- a/src/armnn/test/ProfilerTests.cpp
+++ b/src/armnn/test/ProfilerTests.cpp
@@ -57,6 +57,8 @@ void RegisterUnregisterProfilerSingleThreadImpl(bool &res)
// Check that the profiler has been un-registered for this thread.
res &= !profilerManager.GetProfiler();
+
+ armnn::ProfilerManager::GetInstance().RegisterProfiler(nullptr);
}
} // namespace
@@ -351,6 +353,7 @@ BOOST_AUTO_TEST_CASE(ProfilerJsonPrinter)
"unit\": \"us\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n");
BOOST_CHECK(output == blessedOutput);
+ armnn::ProfilerManager::GetInstance().RegisterProfiler(nullptr);
}
BOOST_AUTO_TEST_SUITE_END();