Skip to content

Validate ORT format input argument counts - #32865

Open
danielsongmicrosoft wants to merge 1 commit into
microsoft:mainfrom
danielsongmicrosoft:user/danielsongmicrosoft/onnxruntime-robustness-85842017fe01
Open

danielsongmicrosoft wants to merge 1 commit into
microsoft:mainfrom
danielsongmicrosoft:user/danielsongmicrosoft/onnxruntime-robustness-85842017fe01

Conversation

@danielsongmicrosoft

Copy link
Copy Markdown
Contributor

Summary

  • Reject negative, overflowing, and mismatched ORT-format input argument counts during load.
  • Preserve valid variadic input count normalization.

Validation

  • Warnings-as-errors build completed successfully.
  • Focused invalid and valid ORT-format input-count tests passed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The variadic normalization test fails in minimal builds because normalization only occurs during full-build graph resolution.

Review effort: Balanced
Findings: 1 Medium severity

Open (1)
What changed in this PR

Validates ORT-format node input counts during model loading while preserving full-build variadic normalization.

Changes:

  • Rejects negative, overflowing, and mismatched input counts.
  • Adds malformed-model and variadic normalization tests.
File Description
onnxruntime/​core/​graph/​graph.cc Adds safe input-count validation and accumulation.
onnxruntime/​test/​framework/​ort_model_only_test.cc Adds input-count loading tests.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread onnxruntime/test/framework/ort_model_only_test.cc
@danielsongmicrosoft
danielsongmicrosoft force-pushed the user/danielsongmicrosoft/onnxruntime-robustness-85842017fe01 branch from e137a69 to d28e922 Compare September 28, 2026 19:43
@danielsongmicrosoft
danielsongmicrosoft marked this pull request as ready for review September 28, 2026 19:54

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants