Fixed Invalid read of size 8 reported by Valgrind #545
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
reported by Valgrind:
==25812== Invalid read of size 8
==25812== at 0x80A052E: std::__shared_ptr<tim::vx::Tensor, (__gnu_cxx::_Lock_policy)2>::__shared_ptr(std::__shared_ptr<tim::vx::Tensor, (__gnu_cxx::_Lock_policy)2> const&) (shared_ptr_base.h:1121)
==25812== by 0x80A0578: std::shared_ptrtim::vx::Tensor::shared_ptr(std::shared_ptrtim::vx::Tensor const&) (shared_ptr.h:119)
==25812== by 0x891FD52: tim::transform::LayoutInference(std::shared_ptrtim::vx::Graph const&, std::shared_ptrtim::vx::Context&, std::map<std::shared_ptrtim::vx::Tensor, std::shared_ptrtim::transform::IPermuteVector, std::less<std::shared_ptrtim::vx::Tensor >, std::allocator<std::pair<std::shared_ptrtim::vx::Tensor const, std::shared_ptrtim::transform::IPermuteVector > > >) (layout_inference.cc:331)
==25812== by 0x809DA98: vx::delegate::Delegate::Invoke(vx::delegate::OpData const&, TfLiteContext*, TfLiteNode*) (delegate_main.cc:646)
==25812== by 0x809A882: (anonymous namespace)::DelegateNodeRegistration()::{lambda(TfLiteContext*, TfLiteNode*)#4}::operator()(TfLiteContext*, TfLiteNode*) const (delegate_main.cc:77)
==25812== by 0x809A8A9: (anonymous namespace)::DelegateNodeRegistration()::{lambda(TfLiteContext*, TfLiteNode*)#4}::_FUN(TfLiteContext*, TfLiteNode*) (delegate_main.cc:78)
==25812== by 0x2B3377: tflite::Subgraph::OpInvoke(TfLiteRegistration const&, TfLiteNode*) (subgraph.cc:1013)
==25812== by 0x2B42F9: tflite::Subgraph::Invoke() (subgraph.cc:1280)
==25812== by 0x2656EA: tflite::Interpreter::Invoke() (interpreter.cc:230)
==25812== by 0x136A03: tflite::benchmark::BenchmarkTfLiteModel::RunImpl() (benchmark_tflite_model.cc:848)
==25812== by 0x12451F: tflite::benchmark::BenchmarkModel::Run(int, float, float, tflite::benchmark::RunType, TfLiteStatus*) (benchmark_model.cc:227)
==25812== by 0x1251CB: tflite::benchmark::BenchmarkModel::Run() (benchmark_model.cc:315)
this invalid read was fixed in layout_inference.cc by this commit