openvino
abc3de36 - [ONNX] Store decoder with shared_ptr instead of raw pointer (#35939)

Commit
2 days ago
[ONNX] Store decoder with shared_ptr instead of raw pointer (#35939) ### Details: - Fix use-after-free in ONNX Frontend when translating subgraphs (`If`/`Loop`/`Scan`): `ONNXFrameworkNode` / `NotSupportedONNXNode` / nested `Node` objects held raw `const DecoderBaseOperation*` pointers into decoders owned by a sub-`InputModel` that was destroyed right after subgraph translation, causing crashes in later passes (e.g. `collect_unconverted_ops`). - Change `Node::m_decoder` from raw pointer to `std::shared_ptr<const DecoderBaseOperation>` so the decoder's lifetime is tied to the `Node`. `OpPlace` already owns decoders by `shared_ptr`, so the call site just forwards it. 5 lines across 3 files. ### Tickets: - N/A ### AI Assistance: - AI assistance used: yes - AI investigated the crash and prepared the fix.
Author
Parents
Loading