[GHA] [Sanitizers] Transformations func tests show leaks#34758
Open
praasz wants to merge 6 commits intoopenvinotoolkit:masterfrom
Open
[GHA] [Sanitizers] Transformations func tests show leaks#34758praasz wants to merge 6 commits intoopenvinotoolkit:masterfrom
praasz wants to merge 6 commits intoopenvinotoolkit:masterfrom
Conversation
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes sanitizer-reported leaks triggered when model validation/topological sort detects cycles by explicitly breaking circular dependencies before throwing, and updates several core tests to avoid leaking allocations/nodes when exceptions occur.
Changes:
- Break node argument/control-dependency links on loop detection in
topological_sortto allow reference cycles to be released before throwing. - Add/adjust regression tests that construct cyclic graphs and assert
ov::Modelcreation throws (covering 1-node and 2-node loops, plus a cycle created via output replacement). - Update a few unit tests to properly own/deallocate allocated resources (allocator aligned allocation; opset
create()results).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/core/include/openvino/core/graph_util.hpp |
On loop detection, disconnects node inputs/control deps before throwing to prevent leaks from cycles. |
src/core/src/descriptor/input.cpp |
Simplifies m_src_node assignment when replacing outputs. |
src/core/tests/model.cpp |
Adds a 2-node cycle regression test for model construction/topological sort throwing. |
src/core/tests/node_input_output.cpp |
Wraps tests in ov::test namespace and adds a cyclic-model construction throw test to ensure no leaks. |
src/core/tests/ov_default_allocator_test.cpp |
Ensures aligned allocation test also deallocates the returned pointer. |
src/core/tests/conditional_compilation/ov_cc_on.cpp |
Wraps OpSet::create*() raw pointers in shared_ptr to avoid test leaks. |
src/core/tests/conditional_compilation/ov_cc_off.cpp |
Same as above for the “cc off” variant. |
src/core/tests/conditional_compilation/ov_cc_collect.cpp |
Same as above for the “collect” variant. |
t-jankowski
approved these changes
Mar 18, 2026
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
Signed-off-by: Pawel Raasz <pawel.raasz@intel.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Details:
Tickets:
AI Assistance: