Skip to content

Fix access violation when Tensor is 0-size shape constant and scalar …#34895

Merged
ababushk merged 3 commits intoopenvinotoolkit:releases/2026/1from
sgbihu:webnn_0size_access
Mar 25, 2026
Merged

Fix access violation when Tensor is 0-size shape constant and scalar …#34895
ababushk merged 3 commits intoopenvinotoolkit:releases/2026/1from
sgbihu:webnn_0size_access

Conversation

@sgbihu
Copy link
Copy Markdown
Contributor

@sgbihu sgbihu commented Mar 24, 2026

Details:

  • This case will make element_count == 0, m_shape.size() == 1, but shape_size(m_shape) == 0.
  • The repeats in src\plugins\intel_cpu\src\nodes\broadcast.cpp is 0. But the srcDims.size() = 1. That make the program access repeats[0] and cause the access violation.

Port the #34874 to 2026.1

Tickets:

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

…input

Add the model file

Fix tensor constant handling for 0-size shape and improve reshape input validation

Refactor get_ov_constant to improve constant creation logic and handle 0-size tensor cases

revert some changes

Add the missed part

Revert unexpected change
@sgbihu sgbihu requested a review from a team as a code owner March 24, 2026 15:22
@github-actions github-actions Bot added the category: ONNX FE OpenVINO ONNX FrontEnd label Mar 24, 2026
@MayureshV1
Copy link
Copy Markdown

@mvafin , @praasz .. Cna you please review/ approve for OV 2026.1 merge

@moslex moslex added this to the 2026.1 milestone Mar 25, 2026
@moslex moslex added the priority: high High piority label Mar 25, 2026
@moslex moslex added this pull request to the merge queue Mar 25, 2026
@moslex moslex removed the priority: high High piority label Mar 25, 2026
@ababushk ababushk removed this pull request from the merge queue due to a manual request Mar 25, 2026
@ababushk ababushk merged commit 63e3152 into openvinotoolkit:releases/2026/1 Mar 25, 2026
202 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: ONNX FE OpenVINO ONNX FrontEnd Code Freeze

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants