diff options
author | Liam Barry <liam.barry@arm.com> | 2023-07-28 11:27:38 +0100 |
---|---|---|
committer | Liam Barry <liam.barry@arm.com> | 2023-07-28 14:56:22 +0100 |
commit | f5afd52405519015df94ccc64cd520cea7943e7c (patch) | |
tree | 7ebf8f41f8f19e3e07b9fe119c51d4ca1d903c9d /source | |
parent | 2bf6a70eddc8842643f1209a1e9bcecf76ff7a3d (diff) | |
download | ml-embedded-evaluation-kit-f5afd52405519015df94ccc64cd520cea7943e7c.tar.gz |
MLECO-4246: Bug fix MLEK hardfault when SRAM exceeded
GCC builds of inference runner hardfault when tensor allocation
fails.
Traced to duplicated delete calls on interpreter member variable in app
code and ~Model() which has undefined behaviour
Signed-off-by: Liam Barry <liam.barry@arm.com>
Change-Id: I3872338b4fdc3c25aa26a5cd55991cd575da5a3c
Diffstat (limited to 'source')
-rw-r--r-- | source/application/api/common/source/Model.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/application/api/common/source/Model.cc b/source/application/api/common/source/Model.cc index 80c10b7..f365c89 100644 --- a/source/application/api/common/source/Model.cc +++ b/source/application/api/common/source/Model.cc @@ -98,6 +98,7 @@ bool arm::app::Model::Init(uint8_t* tensorArenaAddr, if (allocate_status != kTfLiteOk) { printf_err("tensor allocation failed!\n"); delete this->m_pInterpreter; + this->m_pInterpreter = nullptr; return false; } |