diff options
author | SiCong Li <sicong.li@arm.com> | 2023-11-14 15:17:10 +0000 |
---|---|---|
committer | Anitha Raj <anitha.raj@arm.com> | 2023-11-15 14:16:26 +0000 |
commit | 26c68a0e5f555e316cab18352fa3b62f22af8bfb (patch) | |
tree | f8a24f6cda3c05335e752aeba5a5f3e0286ac15e /src/runtime/CL/CLMemoryRegion.cpp | |
parent | c107c9329d258f684c5834ad7bf607fc7cb7305e (diff) | |
download | ComputeLibrary-26c68a0e5f555e316cab18352fa3b62f22af8bfb.tar.gz |
Fix various coverity issues
Resolves COMPMID-6677
Signed-off-by: SiCong Li <sicong.li@arm.com>
Change-Id: I99bf2385f6edc0836faacb31f5c66ed4fb051e40
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/10729
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Viet-Hoa Do <viet-hoa.do@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL/CLMemoryRegion.cpp')
-rw-r--r-- | src/runtime/CL/CLMemoryRegion.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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() |