aboutsummaryrefslogtreecommitdiff
path: root/src/armnnDeserializer/Deserializer.cpp
diff options
context:
space:
mode:
authorMatthew Bentham <Matthew.Bentham@arm.com>2019-09-19 12:04:13 +0100
committerMatteo Martincigh <matteo.martincigh@arm.com>2019-09-19 12:43:19 +0000
commit75ae2b026c99896ec0aa574ff985992ff422c3b2 (patch)
tree8d6c6fb1c07f2e4a83e92721f00a124a6fc06d8d /src/armnnDeserializer/Deserializer.cpp
parentdd32c5247704df40c95da5fddcf55acfd2231b1c (diff)
downloadarmnn-75ae2b026c99896ec0aa574ff985992ff422c3b2.tar.gz
Fix illegal use of anonymous stack veriable in Deserializer
Temporary lifetime extension certainly applies where the local variable is a const reference, but in this case (non-const refernece) address sanitizer was reporting a problem. In any case in other places that we use ToTensorInfo we store the value, so I think the original code here was a mistake. Change-Id: I55e185c46b1bf367a96d7d8c411ef86f07e8bd8d Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com>
Diffstat (limited to 'src/armnnDeserializer/Deserializer.cpp')
-rw-r--r--src/armnnDeserializer/Deserializer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/armnnDeserializer/Deserializer.cpp b/src/armnnDeserializer/Deserializer.cpp
index f8ec2e79cf..1dab9bf74f 100644
--- a/src/armnnDeserializer/Deserializer.cpp
+++ b/src/armnnDeserializer/Deserializer.cpp
@@ -2481,7 +2481,7 @@ void Deserializer::ParseStack(GraphPtr graph, unsigned int layerIndex)
for (unsigned int i=0; i<inputs.size(); ++i)
{
- armnn::TensorShape& inputShape = ToTensorInfo(inputs[i]).GetShape();
+ armnn::TensorShape inputShape = ToTensorInfo(inputs[i]).GetShape();
if (descriptor.m_InputShape != inputShape)
{
std::stringstream ss;