From d4650e9e98c8f854776ae78fb6d3e46e7fe4ba20 Mon Sep 17 00:00:00 2001 From: SiCong Li Date: Tue, 14 Nov 2023 15:17:10 +0000 Subject: Fix various coverity issues Resolves COMPMID-6677 Signed-off-by: SiCong Li Change-Id: I99bf2385f6edc0836faacb31f5c66ed4fb051e40 Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10729 Benchmark: Arm Jenkins Reviewed-by: Viet-Hoa Do Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins --- src/runtime/CL/CLMemoryRegion.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/runtime') diff --git a/src/runtime/CL/CLMemoryRegion.cpp b/src/runtime/CL/CLMemoryRegion.cpp index 835958b816..c9ddf9b85c 100644 --- a/src/runtime/CL/CLMemoryRegion.cpp +++ b/src/runtime/CL/CLMemoryRegion.cpp @@ -26,6 +26,8 @@ #include "arm_compute/core/Error.h" #include "arm_compute/runtime/CL/CLScheduler.h" +#include "src/common/utils/Log.h" + namespace arm_compute { ICLMemoryRegion::ICLMemoryRegion(size_t size) @@ -72,7 +74,14 @@ CLBufferMemoryRegion::~CLBufferMemoryRegion() // Flush the command queue to ensure all commands that may use this memory buffer are scheduled to be finished before // this buffer is freed // Do not call finish as it is a blocking call which affects the performance - CLScheduler::get().queue().flush(); + try + { + CLScheduler::get().queue().flush(); + } + catch (const std::exception &e) + { + ARM_COMPUTE_LOG_ERROR_ACL(e.what()); + } } void *CLBufferMemoryRegion::ptr() -- cgit v1.2.1