diff options
author | Colm Donelan <colm.donelan@arm.com> | 2023-06-25 15:29:08 +0100 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2023-06-26 16:04:03 +0000 |
commit | ed928a91a80db4f013995a558433012b1dfc03ea (patch) | |
tree | d221d9fbe34f416816d64f90808df35369df1c45 | |
parent | 689ba0cd7d76788b546c4f635a5f95bd640259aa (diff) | |
download | armnn-ed928a91a80db4f013995a558433012b1dfc03ea.tar.gz |
Fixing fault in ExeNet when a model file does not include an extension.
If you pass a file name without an extension as the -m parameter to
execute network it won't be able to determine the parser to use. This
results in a segmentation fault.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: I91821a5abd50b65b8d60409aa9a807013e0b0e6a
-rw-r--r-- | tests/ExecuteNetwork/ArmNNExecutor.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/ExecuteNetwork/ArmNNExecutor.cpp b/tests/ExecuteNetwork/ArmNNExecutor.cpp index ac857a90df..6955a492b3 100644 --- a/tests/ExecuteNetwork/ArmNNExecutor.cpp +++ b/tests/ExecuteNetwork/ArmNNExecutor.cpp @@ -612,7 +612,10 @@ std::unique_ptr<ArmNNExecutor::IParser> ArmNNExecutor::CreateParser() LogAndThrow("Not built with Onnx parser support."); #endif } - + if (parser == nullptr) + { + throw InvalidArgumentException("Unable to determine the model type based on the file name extension."); + } return parser; } |